Skip to content

Commit c157ce8

Browse files
authored
Add dependabot for GitHub Actions dependencies (#8)
2 parents ca06d28 + 2d8d301 commit c157ce8

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check dependabot update
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- .github/workflows/*.yml
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
test-feature:
16+
uses: ./.github/workflows/test-feature.yml
17+
dependabot-auto-approve:
18+
needs:
19+
- test-feature
20+
runs-on: ubuntu-latest
21+
if: ${{ github.actor == 'dependabot[bot]' }}
22+
steps:
23+
- name: Dependabot metadata
24+
id: dependabot-metadata
25+
uses: dependabot/fetch-metadata@v1.6.0
26+
with:
27+
github-token: '${{ secrets.GITHUB_TOKEN }}'
28+
- name: Enable auto-merge for Dependabot PRs
29+
run: gh pr merge --auto --merge "$PR_URL"
30+
env:
31+
PR_URL: ${{ github.event.pull_request.html_url }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)