Skip to content

vishal-kapse/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

Simple Slack notification action visitors

License: MIT

Send GitHub Actions workflow status notifications to Slack. A very simple and light javascript action uses POST request to slack webhook.

Features

  • Simple, light and easy to use
  • Customize the Slack notification message
  • Dynamic color of slack message based on the status of job. Green if success and red on failure

Example workflows

Minimal workflow

  - name: "Workflow Status Slack Notification"
    if: failure()
    uses: vishal-kapse/[email protected]
    with:
      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
      status: ${{ job.status }}
     

Custom message

  - uses: vishal-kapse/[email protected]
    if: always()
    with:
      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
      status: ${{ job.status }}
      message: "Github workflow run has status ${{ job.status }}"

Note: If status is not passed it will take the default value as failure

About

Simple Slack notification action using webhook

Resources

License

Stars

Watchers

Forks

Packages

No packages published