Notify Slack when a GitHub Action succeeds, fails, or is cancelled. Lightweight: only requires curl
. Concise notification text.
- Create a custom slack app and enable its webhooks.
- Add the webhook url as a Github secret. Examples below assume it's named
SLACK_WEBHOOK
. - Incorporate the example below into your repo's
.github/workflows/
directory.
name: CI
on:
pull_request:
permissions:
actions: read
jobs:
pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Tests
run: make check
- name: Report Status to Slack
if: always()
uses: endcrawl/github-action-slack-notify-curl@master
with:
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}