Skip to content

Commit f926fd4

Browse files
author
Oleg
committed
Add automerge for dependabot PRs
1 parent c314b62 commit f926fd4

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,21 @@ jobs:
150150
subject-name: ${{ env.IMAGE_REGISTRY }}/${{ steps.build_image.outputs.image }}
151151
subject-digest: ${{ steps.push.outputs.digest }}
152152
push-to-registry: true
153-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
153+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
154+
155+
automerge:
156+
needs: build
157+
runs-on: ubuntu-latest
158+
159+
if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
160+
161+
permissions:
162+
contents: write
163+
pull-requests: write
164+
165+
steps:
166+
- name: Automatically merge allowed PRs
167+
run: gh pr merge --auto --merge "$PR_URL"
168+
env:
169+
PR_URL: ${{ github.event.pull_request.html_url }}
170+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)