Skip to content

Commit

Permalink
Add workflow to auto-approve and -merge dependabot PRs (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
lord-haffi committed Oct 27, 2023
1 parent 9a959bd commit 390126b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Dependabot auto-approve / -merge
on: pull_request

jobs:
dependabot:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"

0 comments on commit 390126b

Please sign in to comment.