diff --git a/.github/workflows/ci-test-hosted.yml b/.github/workflows/ci-test-hosted.yml index 30e65bb615..7a09595b59 100644 --- a/.github/workflows/ci-test-hosted.yml +++ b/.github/workflows/ci-test-hosted.yml @@ -463,9 +463,12 @@ jobs: if [[ "${{ steps.test_status.outputs.run_result }}" == "failedtest" ]]; then echo "slack_message=There are test failures in the run. Please check the for more details." >> $GITHUB_OUTPUT echo "slack_color=#FF0000" >> $GITHUB_OUTPUT - else - echo "slack_message=All tests passed successfully :tada: . Cypress Dashboard: " >> $GITHUB_OUTPUT + elif [[ ${{ needs.ci-test.result }} == 'success' ]]; then + echo "slack_message=All tests passed successfully :tada: Cypress Dashboard: " >> $GITHUB_OUTPUT echo "slack_color=#00FF00" >> $GITHUB_OUTPUT + elif [[ "${{ needs.ci-test.result }}" != "success" ]]; then + echo "slack_message=There are build failures. To analyze run go <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" >> $GITHUB_OUTPUT + echo "slack_color=#FF0000" >> $GITHUB_OUTPUT fi - name: Slack Notification diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index da5050c406..aafbe67747 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -117,12 +117,15 @@ jobs: if: always() id: slack_notification run: | - if [[ "${{ needs.ci-test.result }}" != "success" ]]; then + if [[ "${{ steps.test_status.outputs.run_result }}" == "failedtest" ]]; then echo "slack_message=There are test failures in the run. Please check the for more details." >> $GITHUB_OUTPUT echo "slack_color=#FF0000" >> $GITHUB_OUTPUT - else - echo "slack_message=All tests passed successfully :tada: . Cypress Dashboard: " >> $GITHUB_OUTPUT + elif [[ ${{ needs.ci-test.result }} == 'success' ]]; then + echo "slack_message=All tests passed successfully :tada: Cypress Dashboard: " >> $GITHUB_OUTPUT echo "slack_color=#00FF00" >> $GITHUB_OUTPUT + elif [[ "${{ needs.ci-test.result }}" != "success" ]]; then + echo "slack_message=There are build failures. To analyze run go <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" >> $GITHUB_OUTPUT + echo "slack_color=#FF0000" >> $GITHUB_OUTPUT fi - name: Slack Notification