Skip to content

Commit

Permalink
chore(rest): Update OAS regen script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidnioulz committed Oct 28, 2024
1 parent 3803678 commit 769f511
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/automerge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,23 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Regenerate API clients on OpenAPI Spec change
run: pnpm api:regen
run: |
pnpm api:regen
pnpm format
- name: Commit regenerated API clients
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "feat(deps): Update OpenAPI Spec generated code"
git config user.name github-actions-shell
git config user.email github-actions[bot]@users.noreply.github.com
git add packages/rest/src/__generated__
git commit -nm "feat(rest): Update OpenAPI Spec generated code"
git push
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
dependabot-approve:
needs: [dependabot-regen-api]
runs-on: ubuntu-latest
if: |
if: |
always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
Expand All @@ -51,7 +53,7 @@ jobs:
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
Expand All @@ -66,9 +68,9 @@ jobs:
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 769f511

Please sign in to comment.