From bc5080ba7f6bff1daf405a8ccb1add4d6a7c0c5e Mon Sep 17 00:00:00 2001 From: Nithin P Date: Thu, 3 Oct 2024 16:24:52 +0530 Subject: [PATCH] dsds --- .../workflows/golang_rc_candidate_test.yml | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/golang_rc_candidate_test.yml b/.github/workflows/golang_rc_candidate_test.yml index 32b13a9f5..f6951dd4f 100644 --- a/.github/workflows/golang_rc_candidate_test.yml +++ b/.github/workflows/golang_rc_candidate_test.yml @@ -20,7 +20,6 @@ jobs: run: | #!/bin/bash shopt -s expand_aliases - TRACER_PATH=$(pwd) echo $TRACER_PATH @@ -69,19 +68,20 @@ jobs: echo "All done!" echo "GO_RC_VERSION=$rcToInstall" >> $GITHUB_ENV - - name: Send result to slack channel + - name: Send sucess to slack channel + if: ${{ success() }} uses: slackapi/slack-github-action@v1.24.0 with: channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} payload: | { - "text": ":mega: Unit tests run with Golang RC version-${{ env.GO_RC_VERSION }} - sucess:tada:", + "text": ":mega: Unit tests executed successfully with Golang RC version ${{ env.GO_RC_VERSION }}. :tada:", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": ":mega: Unit tests run with Golang RC version-${{ env.GO_RC_VERSION }} - sucess:tada:" + "text": ":mega: Unit tests executed successfully with Golang RC version ${{ env.GO_RC_VERSION }}. :tada:" } } ] @@ -89,3 +89,25 @@ jobs: env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_RELEASE_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} + - name: Send sucess to slack channel + if: ${{ cancelled() }} + uses: slackapi/slack-github-action@v1.24.0 + with: + channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} + payload: | + { + "text": ":alert2: Unit tests run with Golang RC version ${{ env.GO_RC_VERSION }} have failed! :alert2:", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":alert2: Unit tests run with Golang RC version ${{ env.GO_RC_VERSION }} have failed! :alert2:" + } + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_RELEASE_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} +