automerge stable dependencies (#451)

Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
This commit is contained in:
Buckaroo Banzai 2024-01-10 01:02:03 +01:00 committed by GitHub
parent 9b478e1ccb
commit 91a693d7b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

26
.github/workflows/automerge.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: automerge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{
contains(steps.metadata.outputs.dependency-names, 'pipeworks') ||
contains(steps.metadata.outputs.dependency-names, 'technic') ||
contains(steps.metadata.outputs.dependency-names, 'mods/mtg')}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}