Skip to content

Commit a71a11b

Browse files
committed
ci: add auto-merge workflow for Dependabot PRs
1 parent c0d4093 commit a71a11b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Auto-merge Dependabot
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
auto-merge:
10+
if: github.actor == 'dependabot[bot]'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: dependabot/fetch-metadata@v2
14+
id: meta
15+
- name: Auto-merge patch and minor updates
16+
if: steps.meta.outputs.update-type != 'version-update:semver-major'
17+
run: gh pr merge "$PR_URL" --auto --squash
18+
env:
19+
PR_URL: ${{ github.event.pull_request.html_url }}
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)