ci: automerge dependabot PRs

This commit is contained in:
seth 2024-03-03 19:03:25 -05:00
parent cd1e3220c7
commit 1ea08671fb
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86

28
.github/workflows/autobot.yaml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Auto-merge Dependabot
on: pull_request
jobs:
automerge:
name: Check and merge PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: github.actor == 'dependabot[bot]'
steps:
- uses: dependabot/fetch-metadata@v1
id: metadata
with:
github-token: ${{ github.token }}
# auto merge minor releases
- name: Enable auto-merge
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --rebase "$PR"
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.pull_request.html_url }}