Skip to content

endcrawl/github-action-slack-notify-curl

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Github Action Slack Notifications via Curl

Notify Slack when a GitHub Action succeeds, fails, or is cancelled. Lightweight: only requires curl. Concise notification text.

Example Slack Notification on Success

Setup

  1. Create a custom slack app and enable its webhooks.
  2. Add the webhook url as a Github secret. Examples below assume it's named SLACK_WEBHOOK.
  3. Incorporate the example below into your repo's .github/workflows/ directory.

Example Usage

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 }}