forked from rudderlabs/rudder-transformer
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.37 KB
/
slack-notify.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
42
43
44
45
46
47
48
49
50
51
name: Notify workflow failure
on:
workflow_call:
inputs:
should_notify:
type: boolean
default: true
workflow_url:
type: string
required: true
jobs:
notify:
runs-on: ubuntu-latest
if: ${{ inputs.should_notify }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: notify
uses: slackapi/[email protected]
continue-on-error: true
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
PROJECT_NAME: 'Rudder Transformer'
with:
channel-id: ${{ secrets.SLACK_INTEGRATION_DEV_CHANNEL_ID }}
payload: |
{
"text": "*<prod release tests failed>*\nCC: <!subteam^S02AEQL26CT>",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":siren2: prod release tests - Failed :siren2:"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*<${{inputs.workflow_url}}|failed workflow>*\nCC: <!subteam^S02AEQL26CT>"
}
}
]
}