From 5091a358cef57bc8b49e14336a52cf897c1184b7 Mon Sep 17 00:00:00 2001 From: YustinaKvr Date: Wed, 16 Oct 2024 14:47:02 +0200 Subject: [PATCH] Add automerge --- .github/workflows/automerge.yaml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/automerge.yaml diff --git a/.github/workflows/automerge.yaml b/.github/workflows/automerge.yaml new file mode 100644 index 0000000..2521dba --- /dev/null +++ b/.github/workflows/automerge.yaml @@ -0,0 +1,42 @@ +name: automerge + +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} + +jobs: + automerge: + runs-on: ubuntu-latest + if: > + contains(github.event.pull_request.labels.*.name, 'gate') + environment: github + steps: + - name: Create GitHub App Token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_KEY }} + + - id: automerge + name: automerge + uses: pascalgn/automerge-action@v0.16.3 + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + MERGE_LABELS: "gate" + MERGE_METHOD: "squash"