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