Skip to content

Commit

Permalink
build: approve PR before merge
Browse files Browse the repository at this point in the history
  • Loading branch information
npepinpe committed Jul 24, 2024
1 parent 1dbfd64 commit 78befb1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,18 @@ jobs:
- id: approve-and-merge-dependabot
name: Approve and merge dependabot PR
if: github.actor == 'dependabot[bot]' && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')
run: gh pr merge --auto --merge "$PR_URL"
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- id: approve-and-merge-backport
name: Approve and merge backport PR
if: github.actor != 'dependabot[bot]'
run: gh pr merge --auto --merge "$PR_URL"
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down

0 comments on commit 78befb1

Please sign in to comment.