Skip to content

Commit e85be07

Browse files
committed
Merge docker dependabot updates automatically, but only in this template
1 parent b7093f8 commit e85be07

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Dependabot auto-approve
2+
on: pull_request_target
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/[email protected]
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
19+
- name: Enable auto-merge for Dependabot PRs
20+
if: ${{ contains(steps.metadata.outputs.package-ecosystem, 'docker') }}
21+
run: gh pr merge --auto --merge "$PR_URL"
22+
env:
23+
PR_URL: ${{github.event.pull_request.html_url}}
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/initial_setup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
# sed -i "/if: github.repository != 'AlmaLinux\/atomic-respin-template'/d" .github/workflows/*.yml
2222
rm -rf \
2323
.github/README.md \
24+
.github/workflows/auto-merge-dependabot.yml \
2425
.github/workflows/initial_setup.yml
2526
2627
- name: Commit changes

0 commit comments

Comments
 (0)