Skip to content

ci notify

ci notify #7

Workflow file for this run

name: ci notify
# run after all completed workflows on main
on:
workflow_run:
workflows: ["*"]
branches: [main,release*]
types: [completed]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Slack
uses: slackapi/[email protected]
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🚨 `${{ github.event.repository.name }}` repo CI <${{ github.event.workflow_run.html_url }}|failed>: `${{ github.event.workflow.name }}`"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK