chore: notify #dev of nightly gauntlet failures (#16105)

Expands on https://github.com/coder/coder/pull/16102

This workflow is currently failing every night, so this will not only
raise immediate awareness but will also be easy to validate this job.

Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
Danny Kopping
2025-01-13 12:15:15 +02:00
committed by GitHub
parent a7fe35af25
commit 73d8dde6ed
2 changed files with 50 additions and 1 deletions
+1 -1
View File
@@ -1263,7 +1263,7 @@ jobs:
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ CI Failure in `main`",
"text": "❌ CI Failure in main",
"emoji": true
}
},
+49
View File
@@ -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 }}