Sends a Slack notification. Simple as that.
Appearance on Slack :
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.
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@e820f54"
(=> link to the commits list : https://github.com/Ilshidur/action-slack/commits/master)
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.
Event Payload data can also be interpolated in the message using brackets ({{
and }}
) with the EVENT_PAYLOAD
variable.
e.g.: Action called: {{ GITHUB_ACTION }} as {{ EVENT_PAYLOAD.pull_request.id }}
See the event types for valid payload information
args = "Hello, beautiful ! I ran a GitHub Action for you <3"
args = "I showed you my commit. Please respond."
SLACK_CHANNEL
(optional) : overrides the default channel of the webhook.SLACK_OVERRIDE_MESSAGE
(optional boolean, defaults to nothing) : set totrue
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.
SLACK_WEBHOOK
: the Slack webhook URL (required, see https://api.slack.com/incoming-webhooks).- That's all.
Because open source is about everyone :
https://github.com/marketplace/actions/post-slack-message
https://github.com/marketplace/actions/slack-notify
Don't forget to ๐ Star ๐ the repo if you like this GitHub Action !
Your feedback is appreciated