-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (39 loc) · 1.08 KB
/
on_path_to_live_failure.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: "[Job] Slack Notification of Path to Live Workflow Failure"
on:
workflow_run:
workflows: [Path To Live]
types: [completed]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'The triggering workflow passed'
on-failure:
name: Post slack message
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
uses: ./.github/workflows/slack_job.yml
with:
channel-id: opg-mlpa-dev
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":exclamation: Path to Live workflow is failing",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Paging <!subteam^S03RPSWH0KF>"
}
}
]
}
secrets:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} # pragma: allowlist secret