Skip to content

Commit b9d5cee

Browse files
bee-sanbee
and
bee
authored
Auto merge dependabot PRs (#755)
This pr: 1. checks if the user == dependabot[bot] 2. if all CI passes, auto approve and merge the PR Co-authored-by: bee <[email protected]>
1 parent cbd0369 commit b9d5cee

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/dependabot.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Dependabot Auto-Merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Enable auto-merge for Dependabot PRs
14+
run: |
15+
gh pr review --approve "$PR_URL"
16+
gh pr merge --auto --merge "$PR_URL"
17+
env:
18+
PR_URL: ${{ github.event.pull_request.html_url }}
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)