File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -1263,7 +1263,7 @@ jobs:
12631263 "type": "header",
12641264 "text": {
12651265 "type": "plain_text",
1266- "text": "❌ CI Failure in ` main` ",
1266+ "text": "❌ CI Failure in main",
12671267 "emoji": true
12681268 }
12691269 },
Original file line number Diff line number Diff line change 7272 if : always()
7373 with :
7474 api-key : ${{ secrets.DATADOG_API_KEY }}
75+
76+ notify-slack-on-failure :
77+ runs-on : ubuntu-latest
78+ if : always() && failure()
79+
80+ steps :
81+ - name : Send Slack notification
82+ run : |
83+ curl -X POST -H 'Content-type: application/json' \
84+ --data '{
85+ "blocks": [
86+ {
87+ "type": "header",
88+ "text": {
89+ "type": "plain_text",
90+ "text": "❌ Nightly gauntlet failed",
91+ "emoji": true
92+ }
93+ },
94+ {
95+ "type": "section",
96+ "fields": [
97+ {
98+ "type": "mrkdwn",
99+ "text": "*Workflow:*\n${{ github.workflow }}"
100+ },
101+ {
102+ "type": "mrkdwn",
103+ "text": "*Failed Job:*\n${{ github.job }}"
104+ },
105+ {
106+ "type": "mrkdwn",
107+ "text": "*Committer:*\n${{ github.actor }}"
108+ },
109+ {
110+ "type": "mrkdwn",
111+ "text": "*Commit:*\n${{ github.sha }}"
112+ }
113+ ]
114+ },
115+ {
116+ "type": "section",
117+ "text": {
118+ "type": "mrkdwn",
119+ "text": "*View failure:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>"
120+ }
121+ }
122+ ]
123+ }' ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }}
You can’t perform that action at this time.
0 commit comments