Skip to content
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
actions/slack/
actions/slack/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Slack

GitHub Action for sending Slack messages which were defined by previous action(s) in ./slack.json.

Secrets

  • SLACK_WEBHOOK_URL - Required The Slack webhook URL.

Environment Variables

  • SLACK_CHANNEL - Optional The Slack channel name.
  • SLACK_USERNAME - Optional The Slack message username.
  • SLACK_ICON - Optional The Slack message icon.

Example

This example sends a Slack notification after a deployment is complete. The apex/actions/up action generates a slack.json to provide a message.

workflow "Deployment" {
  on = "push"
  resolves = ["Deploy Notification"]
}

action "Build" {
  uses = "apex/actions/go@master"
}

action "Deploy" {
  needs = "Build"
  uses = "apex/actions/up@master"
  secrets = ["AWS_SECRET_ACCESS_KEY", "AWS_ACCESS_KEY_ID"]
  args = "deploy production"
}

action "Deploy Notification" {
  needs = "Deploy"
  uses = "apex/actions/slack@master"
  secrets = ["SLACK_WEBHOOK_URL"]
}

Links