From c94019a741ab65ae79dad13b59861139eae96be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 8 Feb 2021 11:31:41 +0000 Subject: [PATCH] fix(ci): use statuses to trigger automerge (#2745) --- .github/workflows/automerge.yml | 19 +------------------ .github/workflows/test.yml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index ab47d8042..6567d1196 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,24 +1,6 @@ name: Automerge on: - pull_request: - branches: - - main - types: - - labeled - - unlabeled - - synchronize - - opened - - edited - - ready_for_review - - reopened - - unlocked - pull_request_review: - types: - - submitted - check_suite: - types: - - completed status: {} jobs: @@ -26,6 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: automerge + if: github.event.context == 'Mergeable' uses: "pascalgn/automerge-action@v0.13.0" env: GITHUB_TOKEN: "${{ secrets.GH_REPO_TOKEN }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3432c8031..f65eae08d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -673,3 +673,23 @@ jobs: - name: Rollback on failure if: failure() run: /usr/local/bin/heroku releases:rollback --app karma-demo + + stage-build-and-deploy: + name: "=== Build and deploy stage ===" + needs: + - benchmark-go + - webpack-bundle-size + - percy + - cross-compile + - docker + - demo-deploy + runs-on: ubuntu-latest + steps: + - name: "Update status" + uses: Sibz/github-status-action@v1.1.1 + with: + authToken: ${{ secrets.GH_REPO_TOKEN }} + context: "Mergeable" + description: "Passed" + state: "success" + sha: ${{github.event.pull_request.head.sha || github.sha}}