Skip to content

Commit b6069bd

Browse files
hopeyenhopeyen
authored andcommitted
feat: auto approve and merge pr by dependabot (#149)
1 parent b7b22df commit b6069bd

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Auto approve and merge PRs by dependabot
2+
3+
on:
4+
pull_request
5+
6+
jobs:
7+
autoapprove:
8+
name: Auto Approve a PR by dependabot
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Auto approve
12+
uses: hmarr/auto-approve-action@v2.0.0
13+
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
14+
with:
15+
github-token: ${{ secrets.DEPENDABOT_TOKEN }}
16+
automerge:
17+
name: Auto merge after successful checks
18+
needs: autoapprove
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Auto merge
22+
uses: pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a
23+
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
26+
MERGE_LABELS: dependencies
27+
MERGE_METHOD: rebase

0 commit comments

Comments
 (0)