Slack Notification #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Slack Notification | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
slackNotification: | |
name: Slack Notification | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Post to a Slack channel | |
id: slack | |
uses: slackapi/slack-github-action@v1.25.0 | |
with: | |
# Slack channel id, channel name, or user id to post message. | |
# See also: https://api.slack.com/methods/chat.postMessage#channels | |
# You can pass in multiple channels to post to by providing a comma-delimited list of channel IDs. | |
channel-id: 'github' | |
# For posting a simple plain text message | |
slack-message: "Release status: ${{ job.status }}\nTest message\nFrom GitHub Actions" | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |