diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..1273139 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -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"