Skip to content

Commit b9d2e1d

Browse files
authored
Enable automerge for Dependabot PRs (#109)
1 parent 5cfc4e7 commit b9d2e1d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dependabot auto-merge
2+
on: pull_request_target
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
jobs:
7+
dependabot:
8+
runs-on: ubuntu-20.04
9+
if: ${{ github.actor == 'dependabot[bot]' }}
10+
steps:
11+
- name: Dependabot metadata
12+
id: dependabot-metadata
13+
uses: dependabot/[email protected]
14+
with:
15+
github-token: "${{ secrets.GITHUB_TOKEN }}"
16+
- name: Enable auto-merge for Dependabot PRs
17+
run: gh pr merge --auto --squash "$PR_URL"
18+
env:
19+
PR_URL: ${{github.event.pull_request.html_url}}
20+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)