[ci] Auto merge dependabot PRs

This commit is contained in:
Nemo 2022-06-07 04:01:33 +00:00 committed by GitHub
parent 65546d7f4e
commit 2cfdf3afa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
name: Dependabot auto-merge release-updates
on: pull_request
# Based on https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v3
name: Clone self repository
with:
ref: ${{ github.head_ref }}
- name: Enable auto-merge for Dependabot PRs for release data
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}