File tree 2 files changed +50
-1
lines changed
2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -1263,7 +1263,7 @@ jobs:
1263
1263
"type": "header",
1264
1264
"text": {
1265
1265
"type": "plain_text",
1266
- "text": "❌ CI Failure in ` main` ",
1266
+ "text": "❌ CI Failure in main",
1267
1267
"emoji": true
1268
1268
}
1269
1269
},
Original file line number Diff line number Diff line change 72
72
if : always()
73
73
with :
74
74
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