Skip to content

Commit b81d6d7

Browse files
committed
Add dependabot merge to workflow
1 parent 39dfdfe commit b81d6d7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/run-tests.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
build:
13+
test:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
@@ -30,3 +30,20 @@ jobs:
3030
- name: Test with pytest
3131
run: |
3232
tox
33+
34+
automerge:
35+
needs: test
36+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
37+
runs-on: ubuntu-latest
38+
permissions:
39+
contents: read
40+
pull-requests: write
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Enable automerge for Dependabot PRs
44+
shell: bash
45+
env:
46+
GH_TOKEN: ${{ github.token }}
47+
PR_NUMBER: ${{ github.event.pull_request.number }}
48+
run: |
49+
gh pr merge --squash --auto "$PR_NUMBER"

0 commit comments

Comments
 (0)