Skip to content

ci notify

ci notify #1692

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/slack-github-action@v1.24.0
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🚨 CI failed on `${{ github.event.repository.name }}:${{ github.event.workflow_run.head_branch }}`."
}
},
{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "https://upload.wikimedia.org/wikipedia/commons/4/43/Minimalist_info_Icon.png",
"alt_text": "images"
},
{
"type": "mrkdwn",
"text": "url: ${{ github.event.workflow_run.html_url }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK