Skip to content

Commit a2cda0a

Browse files
authored
ci: enable auto-merge for patch Dependabot updates
1 parent 09a97a1 commit a2cda0a

File tree

2 files changed

+38
-16
lines changed

2 files changed

+38
-16
lines changed

.github/workflows/dependabot.yml

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

.github/workflows/dependencies.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Dependencies
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
dependency_review:
11+
name: Dependency review
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Review dependencies
19+
uses: actions/dependency-review-action@v4
20+
21+
auto_merge:
22+
name: Enable auto-merge
23+
runs-on: ubuntu-latest
24+
if: github.actor == 'dependabot[bot]'
25+
26+
steps:
27+
- name: Dependabot metadata
28+
id: metadata
29+
uses: dependabot/fetch-metadata@v2
30+
with:
31+
github-token: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Enable auto-merge for Dependabot PRs
34+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
35+
run: gh pr merge --auto --merge "$PR_URL"
36+
env:
37+
PR_URL: ${{ github.event.pull_request.html_url }}
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)