Skip to content

Commit 79c0c5e

Browse files
authored
Merge pull request #49 from voxpupuli/enable_automerge
feat: enable the auto-merge feature on dependabot prs
2 parents f078b32 + a5555b2 commit 79c0c5e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,24 @@ jobs:
106106
name: Test suite
107107
steps:
108108
- run: echo Test suite completed
109+
110+
dependabot:
111+
permissions:
112+
contents: write
113+
name: 'Dependabot auto-merge'
114+
needs:
115+
- tests
116+
runs-on: ubuntu-latest
117+
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
118+
steps:
119+
- name: Dependabot metadata
120+
id: metadata
121+
uses: dependabot/[email protected]
122+
with:
123+
github-token: '${{ secrets.GITHUB_TOKEN }}'
124+
125+
- name: Enable auto-merge for Dependabot PRs
126+
run: gh pr merge --auto --merge "$PR_URL"
127+
env:
128+
PR_URL: ${{github.event.pull_request.html_url}}
129+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)