Skip to content

Commit bf92743

Browse files
authored
feat: auto approve and merge pr by dependabot (#149)
1 parent 34d791a commit bf92743

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
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/[email protected]
13+
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
14+
with:
15+
github-token: ${{ secrets.GITHUB_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.GITHUB_TOKEN }}
26+
MERGE_LABELS: dependencies
27+
MERGE_METHOD: rebase

0 commit comments

Comments
 (0)