From 5771fdf57dc257c0e2bdd1cdab507c8c32174299 Mon Sep 17 00:00:00 2001 From: Sayali Mohadikar <76010603+sayaliM0412@users.noreply.github.com> Date: Tue, 28 May 2024 10:32:47 -0500 Subject: [PATCH] change slack color to red incase of failure (#217) --- .github/workflows/slack-notification.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/slack-notification.yml b/.github/workflows/slack-notification.yml index b27fce0e..a0b58e6b 100644 --- a/.github/workflows/slack-notification.yml +++ b/.github/workflows/slack-notification.yml @@ -11,11 +11,11 @@ jobs: - name: Notify Slack on Build Failure uses: rtCamp/action-slack-notify@v2 env: - SLACK_COLOR: ${{ job.status }} + SLACK_COLOR: ${{ github.event.action == 'test-failure' }} SLACK_MESSAGE: "View details on GitHub Actions: ${{ github.event.client_payload.server_url }}/${{ github.event.client_payload.repository }}/actions/runs/${{ github.event.client_payload.run_id }} <@U042HRTL4DT>. Triggered by repository: ${{ github.event.client_payload.repository }} and job: ${{ github.job }}" SLACK_TITLE: "❌ ${{ github.event.client_payload.repository }} ❌ Tests failed on branch ${{ github.event.client_payload.branch }} for commit ${{ github.event.client_payload.sha }} in repository ${{ github.event.client_payload.repository }}" SLACK_USERNAME: liquibot SLACK_WEBHOOK: ${{ secrets.NIGHTLY_BUILDS_SLACK_WEBHOOK }} SLACK_ICON_EMOJI: ":robot_face:" SLACK_FOOTER: "${{ github.event.client_payload.repository }}" - SLACK_LINK_NAMES: true \ No newline at end of file + SLACK_LINK_NAMES: true