Skip to content

Commit 89d3297

Browse files
authored
Add Dependabot auto-merge workflow
1 parent d127949 commit 89d3297

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/automerge.yaml

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

0 commit comments

Comments
 (0)