|
1
|
name: Auto-merge Dependabot PRs |
|
2
|
|
|
3
|
on: |
|
4
|
pull_request: |
|
5
|
|
|
6
|
permissions: |
|
7
|
contents: write |
|
8
|
pull-requests: write |
|
9
|
|
|
10
|
jobs: |
|
11
|
auto-merge: |
|
12
|
runs-on: ubuntu-latest |
|
13
|
if: github.actor == 'dependabot[bot]' |
|
14
|
steps: |
|
15
|
- name: Approve PR |
|
16
|
run: gh pr review --approve "$PR_URL" |
|
17
|
env: |
|
18
|
PR_URL: ${{ github.event.pull_request.html_url }} |
|
19
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
20
|
|
|
21
|
- name: Enable auto-merge |
|
22
|
run: gh pr merge --auto --squash "$PR_URL" |
|
23
|
env: |
|
24
|
PR_URL: ${{ github.event.pull_request.html_url }} |
|
25
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
26
|
|