File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+ uses : slackapi/slack-github-action@v1.21.0
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": ":bh-alert: `${{ github.event.workflow_run.name }}` failed: ${{ github.event.workflow_run.repository.name }} :bh-alert:"
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