Skip to content

Report Build Package Failures #2752

Report Build Package Failures

Report Build Package Failures #2752

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