Skip to content

kyontan/slack-notify-action

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

Repository files navigation

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.

About

GitHub Action that notifies result of workflow run

Resources

License

Stars

Watchers

Forks

Packages

No packages published