Skip to content

Commit cd86996

Browse files
authored
Add dependabot automerge workflow (#100)
Signed-off-by: John Mertic <jmertic@linuxfoundation.org>
1 parent 66a7257 commit cd86996

File tree

2 files changed

+33
-66
lines changed

2 files changed

+33
-66
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Auto-merge Dependabot PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
dependabot:
13+
runs-on: ubuntu-latest
14+
if: github.actor == 'dependabot[bot]'
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
20+
- name: Approve PR
21+
run: |
22+
gh pr review --approve "${{ github.event.pull_request.number }}"
23+
env:
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Enable auto-merge
27+
run: |
28+
gh pr merge \
29+
--squash \
30+
--auto \
31+
"${{ github.event.pull_request.number }}"
32+
env:
33+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/preview.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)