Skip to content
πŸš€ GitHub Action that sends a Slack notification.
JavaScript Dockerfile HCL
Branch: master
Clone or download
Pull request Compare This branch is 50 commits behind Ilshidur:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.editorconfig
.gitignore
Dockerfile
LICENSE
README.md
action.png
entrypoint.js
package-lock.json
package.json
renovate.json
slack.png

README.md

πŸš€ Slack for GitHub Actions

Sends a Slack notification. Simple as that.

GitHub Action

Appearance on Slack :

Slack message

This GitHub action is part of a list of Actions that are located in an other repo. Feel free to check it out : https://github.com/Ilshidur/actions.


Usage

action "Slack notification" {
  uses = "Ilshidur/action-slack@master"
  secrets = ["SLACK_WEBHOOK"]
  args = "A new commit has been pushed."
}

NOTICE : for stability purposes, it is recommended to use the action with an explicit commit SHA-1 :

uses = "Ilshidur/action-slack@2b45998" (=> link to the commits list : https://github.com/Ilshidur/action-slack/commits/master)

Arguments

The argument is the message to display in the Slack notification.

Environment variables can be interpolated in the message using brackets ({{ and }}) :

e.g.: Action called : {{ GITHUB_ACTION }}

Note : be careful to properly format your messages for Slack.

Examples

  • args = "Hello, beautiful ! I ran a GitHub Action for you <3"
  • args = "I showed you my commit. Please respond."

Environment variables

  • SLACK_CHANNEL (optional) : overrides the default channel of the webhook.
  • SLACK_OVERRIDE_MESSAGE (optional boolean, defaults to nothing) : set to true to remove the first line of the message (Ilshidur/nicolas-coutin.fr/Deployment triggered by Ilshidur (push) :). Any other value will override the message set in the args of this Action.

Secrets

Alternatives

Because open source is about everyone :

https://github.com/marketplace/actions/post-slack-message


Don't forget to 🌟 Star 🌟 the repo if you like this GitHub Action !
Your feedback is appreciated

You can’t perform that action at this time.