github: new attempt at Dependabot auto-merge

This is an updated version of the workflow deleted in f5fc3c35f5,
trying the advice from
https://github.com/cli/cli/issues/6695#issuecomment-1348430969.
This commit is contained in:
Martin von Zweigbergk 2022-12-13 08:48:42 -08:00 committed by Martin von Zweigbergk
parent 6237f3cdfd
commit b87c1cb514

21
.github/workflows/dependabot.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: build
on:
pull_request:
permissions: read-all
jobs:
dependabot-auto-merge:
name: 'Dependabot auto-merge'
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}