From 09e0d3c17a3f1b3af25785e4340671b9586f5884 Mon Sep 17 00:00:00 2001 From: Gabby Getz Date: Tue, 19 Sep 2023 16:02:22 -0400 Subject: [PATCH] workflow_run --- .github/workflows/main.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26e6748ba020..608e282f2d82 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,21 +1,23 @@ run-name: main on: - push: # TODO: workflow_run + workflow_run: + workflows: [dev] + types: [completed] branches: - main - - 'github-actions' - 'cesium.com' jobs: if_error_or_failure: runs-on: ubuntu-latest steps: - name: message result in slack + if: ${{ github.event.workflow_run.conclusion == 'failure' }} id: slack uses: slackapi/slack-github-action@v1.24.0 env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} with: - channel-id: 'test-automation' + channel-id: 'cesiumjs' payload: | { "blocks": [ @@ -23,7 +25,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": ":gh-failed: Commit ${{ github.sha }} on \"${{ github.ref_name }}\" failed" + "text": ":gh-failed: Last commit on \"${{ github.ref_name }}\" failed" } }, {