diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1a2ce44f8aec3..4f357727b6278 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1263,7 +1263,7 @@ jobs: "type": "header", "text": { "type": "plain_text", - "text": "❌ CI Failure in `main`", + "text": "❌ CI Failure in main", "emoji": true } }, diff --git a/.github/workflows/nightly-gauntlet.yaml b/.github/workflows/nightly-gauntlet.yaml index 8aa74f1825dd7..3208c97a9e6bc 100644 --- a/.github/workflows/nightly-gauntlet.yaml +++ b/.github/workflows/nightly-gauntlet.yaml @@ -72,3 +72,52 @@ jobs: if: always() with: api-key: ${{ secrets.DATADOG_API_KEY }} + + notify-slack-on-failure: + runs-on: ubuntu-latest + if: always() && failure() + + steps: + - name: Send Slack notification + run: | + curl -X POST -H 'Content-type: application/json' \ + --data '{ + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "❌ Nightly gauntlet failed", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Workflow:*\n${{ github.workflow }}" + }, + { + "type": "mrkdwn", + "text": "*Failed Job:*\n${{ github.job }}" + }, + { + "type": "mrkdwn", + "text": "*Committer:*\n${{ github.actor }}" + }, + { + "type": "mrkdwn", + "text": "*Commit:*\n${{ github.sha }}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*View failure:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>" + } + } + ] + }' ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }}