Skip to content

Slack

Slack #5

Workflow file for this run

name: Slack
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
jobs:
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Post to Slack
uses: slackapi/[email protected]
with:
channel-id: 'testing-github-actions-slack-bot'
slack-message: "`ci.yml` failed on `main`\n\n*Repo:* ${{ github.event.repository }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}