Skip to content

Notify to Slack

Actions
notify current job status to Slack
v2.0.1
Latest
Star (1)

kyontan/slack-notify-action

Action that notifies workflow status to Slack

Uses slackapi/slack-github-action internally and supports various ways to send.

Please refer above document for setup environment variables.

Notification example

screenshot of notification on success

screenshot of notification on failure

screenshot of notification on cancellation

Usage

Add step using this action at the beginning of all steps.

(This is because the action sends notification in post step, that will not be executed if the main step skipped by the preliminary step failure)

name: build-something

on:
  push: {}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Send notification to Slack
        uses: kyontan/slack-notify-action@v1
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
          SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
          JOB_STATUS: ${{ job.status }}
      - name: Build something
      - ...

You have to pass JOB_STATUS environment variable in addition to requirements by slackapi/slack-github-action.

Notify to Slack is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

notify current job status to Slack
v2.0.1
Latest

Notify to Slack is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.