Skip to content

Commit 8034969

Browse files
committed
build: allow dependabot auto merges for all kits
1 parent fa54375 commit 8034969

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: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
# WARNING - Make sure the repo:
9+
# - has setup up branch protection rules (required status checks) - otherwise all PR will be merged without waiting for build results
10+
# - allows auto-merge (settings -> general -> Pull Requests -> Allow Auto-Merge)
11+
12+
jobs:
13+
dependabot:
14+
runs-on: ubuntu-latest
15+
if: ${{ github.actor == 'dependabot[bot]' }}
16+
steps:
17+
- name: Dependabot metadata
18+
id: metadata
19+
uses: dependabot/fetch-metadata@v1
20+
with:
21+
github-token: "${{ secrets.GITHUB_TOKEN }}"
22+
- name: Enable auto-merge for Dependabot PRs
23+
if: ${{steps.metadata.outputs.package-ecosystem == 'github_actions' || (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')}}
24+
run: gh pr merge --auto --merge "$PR_URL"
25+
env:
26+
PR_URL: ${{github.event.pull_request.html_url}}
27+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)