Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.06 KB

File metadata and controls

39 lines (27 loc) · 1.06 KB

Notify Slack Action

A minimal GitHub composite action that sends a Slack notification when a CI job fails.

Uses slackapi/slack-github-action@ under the hood with an incoming webhook.

Setup

  1. Create a Slack App at api.slack.com/apps
  2. Enable Incoming Webhooks and add one for your target channel
  3. Store the webhook URL as a GitHub repo secret (e.g., SLACK_WEBHOOK_URL)

Usage

- name: Notify Slack on failure
  if: failure()
  uses: deepset-ai/notify-slack-action@v1
  with:
    slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}

Inputs

Input Required Default Description
slack-webhook-url Yes - Slack Incoming Webhook URL
mention-channel No "true" Whether to include @channel in the notification

Message format

The notification includes:

  • Repository name, workflow name, and branch
  • @channel mention (configurable)
  • Link to the failed workflow run

License

Apache 2.0