-
Notifications
You must be signed in to change notification settings - Fork 3.5k
47 lines (47 loc) · 1.29 KB
/
main.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
name: main
on:
workflow_run:
workflows: [dev, prod]
types: [completed]
branches:
- main
- 'cesium.com'
- production
jobs:
if_error_or_failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: message result in slack
id: slack
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: cesiumjs
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":gh-failed: Last commit on \"${{ github.ref_name }}\" failed"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "See commit"
},
"url": "${{ github.event.head_commit.url }}",
"action_id": "button_1"
}
]
}
]
}