Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use commit instead of PR for type update #1759

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions .github/workflows/update-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
jobs:
update-types:
name: Update Types
permissions:
contents: write
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -75,31 +77,15 @@ jobs:
- id: get_swagger_gh_uri
name: Get GitHub URI for azure-rest-api-specs
run: |
git_sha=`git rev-parse HEAD`
git_sha=`git rev-parse --short HEAD`
echo "::set-output name=gh_uri::https://github.com/Azure/azure-rest-api-specs/tree/$git_sha"
working-directory: workflow-temp/azure-rest-api-specs

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
- name: Commit and push
uses: stefanzweifel/git-auto-commit-action@v4
with:
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: autogenerate
branch-suffix: short-commit-hash
delete-branch: true
title: |
Update Generated Types ${{ github.event.inputs.single_path && format('(single path: {0})', github.event.inputs.single_path) || '' }}
body: |
Update Generated Types ${{ github.event.inputs.single_path && format('(single path: {0})', github.event.inputs.single_path) || '' }}

Generate types for ${{ steps.get_swagger_gh_uri.outputs.gh_uri }}

Summary
${{ steps.generate.outputs.summary }}
commit-message: |
Update Generated Types ${{ github.event.inputs.single_path && format('(single path: {0})', github.event.inputs.single_path) || '' }}

Generate types for ${{ steps.get_swagger_gh_uri.outputs.gh_uri }}
labels: autogenerate
draft: false
commit_message: |
Update types from ${{ steps.get_swagger_gh_uri.outputs.gh_uri }} ${{ github.event.inputs.single_path && format('(single path: {0})', github.event.inputs.single_path) || '' }}
branch: ${{ github.event.inputs.single_path && format('autogenerate-{0}', github.event.inputs.single_path) || 'autogenerate' }}
push_options: '--force'
create_branch: true