-
Notifications
You must be signed in to change notification settings - Fork 47
42 lines (41 loc) · 1.41 KB
/
report_packaging_failures.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
name: Report Build Package Failures
on:
workflow_run:
workflows: [Build packages, Build CI Image, CI]
types: [completed]
jobs:
on-failure:
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion != 'success' && github.event.workflow_run.event != 'pull_request' }}
steps:
- name: slack-send
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Workflow run <${{ github.event.workflow_run.html_url }}|${{ github.event.workflow.name}}#${{ github.event.workflow_run.run_number }}>"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Status*\n`${{ github.event.workflow_run.conclusion }}`"
},
{
"type": "mrkdwn",
"text": "*Triggered By*\n<${{ github.event.sender.html_url }}|${{ github.event.sender.login }}>"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK