From 869dd7e2208dca37d753bf3ed449e23385a5a77e Mon Sep 17 00:00:00 2001 From: Karel Suta Date: Fri, 24 Nov 2023 15:22:01 +0100 Subject: [PATCH] Send notification on Slack if e2e fails on push event --- .github/workflows/e2e_tests.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 64d4567e1..b20ff9689 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -93,3 +93,12 @@ jobs: retention-days: 10 path: | ${{ env.CODEFLARE_TEST_OUTPUT_DIR }}/**/*.log + + - name: Post notification about failure to a Slack channel in case of push event + if: failure() && github.event_name == 'push' + uses: slackapi/slack-github-action@v1.24.0 + with: + channel-id: "codeflare-nightlies" + slack-message: "e2e test on push failed, " + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}