From 0298f5ace5716957404ee359bbdf5d071c5ebabd Mon Sep 17 00:00:00 2001 From: Vladimir Vshivkov <32225815+vladimirvshivkov@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:22:21 +0200 Subject: [PATCH] add automerge job (#3) --- .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..3146e77 --- /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"