File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 runs-on : ubuntu-latest
1717 if : ${{ github.event.workflow_run.conclusion == 'failure' }}
1818 steps :
19+ - name : Send Slack notification for auto-merge-upstream
20+ if : ${{ github.event.workflow_run.name == 'auto-merge-upstream' }}
21+ uses : slackapi/slack-github-action@v2.1.0
22+ with :
23+ webhook : ${{ secrets.SLACK_WEBHOOK_URL }}
24+ webhook-type : incoming-webhook
25+ payload : |
26+ {
27+ "blocks": [
28+ {
29+ "type": "header",
30+ "text": {
31+ "type": "plain_text",
32+ "text": "🔴 Workflow Failure: ${{ github.event.workflow_run.name }} in ${{ github.event.workflow_run.repository.name }}"
33+ }
34+ },
35+ {
36+ "type": "section",
37+ "fields": [
38+ {
39+ "type": "mrkdwn",
40+ "text": "*Repository:*\n${{ github.event.workflow_run.repository.full_name }}"
41+ },
42+ {
43+ "type": "mrkdwn",
44+ "text": "*Workflow:*\n${{ github.event.workflow_run.name }}"
45+ },
46+ {
47+ "type": "mrkdwn",
48+ "text": "*Branch:*\n${{ github.event.workflow_run.head_branch }}"
49+ }
50+ ]
51+ },
52+ {
53+ "type": "section",
54+ "text": {
55+ "type": "mrkdwn",
56+ "text": "<!subteam^S04NUBJ20RG> please investigate and fix this failure.\nReach out to the release captain if you need assistance."
57+ }
58+ },
59+ {
60+ "type": "actions",
61+ "elements": [
62+ {
63+ "type": "button",
64+ "text": {
65+ "type": "plain_text",
66+ "text": "View Run"
67+ },
68+ "url": "${{ github.event.workflow_run.html_url }}"
69+ }
70+ ]
71+ }
72+ ]
73+ }
1974 - name : Send Slack notification
75+ if : ${{ github.event.workflow_run.name != 'auto-merge-upstream' }}
2076 uses : slackapi/slack-github-action@v2.1.0
2177 with :
2278 webhook : ${{ secrets.SLACK_WEBHOOK_URL }}
You can’t perform that action at this time.
0 commit comments