This is a fork of rtCamp/action-slack-notify with the following changes:
- Changes the message to a single line with only core details
- Removes most configuration options to keep it simple
- Removes support for Vault
- Updates Go dependencies
You can use this action after any other action. Here is an example setup of this action:
- Create a
.github/workflows/slack-notify.yml
file in your GitHub repo. - Add the following code to the
slack-notify.yml
file. - Only SLACK_WEBHOOK is required, the only available customization options are below. SLACK_ICON defaults to ❌ so you probably want to set that to something else based on whether the run is successful or not.
on: push
name: Slack Notification Demo
jobs:
slackNotification:
name: Slack Notification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Slack Notification
uses: speechanddebate/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: "#tech-updates"
SLACK_USERNAME: "Github Actions"
SLACK_ICON: ":white_check_mark:"
- Create
SLACK_WEBHOOK
secret using GitHub Action's Secret. You can generate a Slack incoming webhook token from here.
Based on: rtCamp/action-slack-notify
MIT © 2022 rtCamp