File tree Expand file tree Collapse file tree 2 files changed +85
-0
lines changed
Expand file tree Collapse file tree 2 files changed +85
-0
lines changed Original file line number Diff line number Diff line change 1+ name : failureNotifications
2+
3+ on :
4+ workflow_run :
5+ workflows :
6+ - version, tag and github release
7+ - publish
8+ types :
9+ - completed
10+
11+ jobs :
12+ failure-notify :
13+ runs-on : ubuntu-latest
14+ if : ${{ github.event.workflow_run.conclusion == 'failure' }}
15+ steps :
16+ - name : Announce Failure
17+ id : slack
18+ 19+ env :
20+ SLACK_WEBHOOK_URL : ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
21+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
22+ with :
23+ payload : |
24+ {
25+ "text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}",
26+ "blocks": [
27+ {
28+ "type": "header",
29+ "text": {
30+ "type": "plain_text",
31+ "text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}"
32+ }
33+ },
34+ {
35+ "type": "section",
36+ "text": {
37+ "type": "mrkdwn",
38+ "text": "repo: ${{ github.event.workflow_run.repository.html_url }}\nworkflow name:${{ github.event.workflow_run.name }}\njob url: ${{ github.event.workflow_run.html_url }}"
39+ }
40+ }
41+ ]
42+ }
Original file line number Diff line number Diff line change 1+ name : failureNotifications
2+
3+ on :
4+ workflow_run :
5+ workflows :
6+ - version, tag and github release
7+ - publish
8+ types :
9+ - completed
10+
11+ jobs :
12+ failure-notify :
13+ runs-on : ubuntu-latest
14+ if : ${{ github.event.workflow_run.conclusion == 'failure' }}
15+ steps :
16+ - name : Announce Failure
17+ id : slack
18+ 19+ env :
20+ # for non-CLI-team-owned plugins, you can send this anywhere you like
21+ SLACK_WEBHOOK_URL : ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
22+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
23+ with :
24+ payload : |
25+ {
26+ "text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}",
27+ "blocks": [
28+ {
29+ "type": "header",
30+ "text": {
31+ "type": "plain_text",
32+ "text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}"
33+ }
34+ },
35+ {
36+ "type": "section",
37+ "text": {
38+ "type": "mrkdwn",
39+ "text": "repo: ${{ github.event.workflow_run.repository.html_url }}\nworkflow name:${{ github.event.workflow_run.name }}\njob url: ${{ github.event.workflow_run.html_url }}"
40+ }
41+ }
42+ ]
43+ }
You can’t perform that action at this time.
0 commit comments