Add automerge GitHub Action (#5)

PRs labeled 'automerge' will squash-merge when all checks pass.
Uses pascalgn/automerge-action. No branch protection needed.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-22 22:53:08 +01:00 committed by GitHub
parent f955fb9d6e
commit cd18436187
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

29
.github/workflows/automerge.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Automerge
on:
check_suite:
types: [completed]
pull_request:
types: [labeled]
jobs:
automerge:
name: Automerge PR
runs-on: ubuntu-latest
if: >
github.event_name == 'pull_request' ||
(github.event_name == 'check_suite' && github.event.check_suite.conclusion == 'success')
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Automerge
uses: pascalgn/automerge-action@v0.16.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: "automerge"
MERGE_METHOD: "squash"
MERGE_DELETE_BRANCH: "true"
UPDATE_METHOD: "rebase"