This action sends a message to a Slack channel
Required
The OAuth token from your Slack App
Required
The channel to post into
Required
The text to send
The Slack Blocks-Kit part of the message (https://api.slack.com/block-kit)
name: Send Slack Message
on:
workflow-dispatch:
jobs:
send-message:
runs-on: ubuntu-latest
steps:
- name: Notify Slack
uses: chrimaeon/github-slack-action@2
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
channel: ${{ secrets.SLACK_CHANNEL }}
text: "The is my first message, yay!"
blocks: |
[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Hello World!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "from **Github Slack Action**!"
}
}
]