https://github.com/chrimaeon/github-slack-action
Github Action to post Slack messages
https://github.com/chrimaeon/github-slack-action
github-actions slack
Last synced: 4 months ago
JSON representation
Github Action to post Slack messages
- Host: GitHub
- URL: https://github.com/chrimaeon/github-slack-action
- Owner: chrimaeon
- License: apache-2.0
- Created: 2021-12-30T21:07:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-11T18:25:48.000Z (over 2 years ago)
- Last Synced: 2024-03-15T09:49:55.390Z (over 1 year ago)
- Topics: github-actions, slack
- Language: TypeScript
- Homepage:
- Size: 432 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Slack Message Action
[](https://github.com/chrimaeon/github-slack-action/actions/workflows/main.yml)
[](https://codecov.io/gh/chrimaeon/github-slack-action)This action sends a message to a Slack channel
## Inputs
### `slack_token`:
**Required**The OAuth token from your [Slack App]
### `channel`:
**Required**The channel to post into
### `text`:
**Required**The text to send
### `blocks`:
The Slack Blocks-Kit part of the message (https://api.slack.com/block-kit)
## Example usage
```yaml
name: Send Slack Messageon:
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**!"
}
}
]
```[Slack App]: https://slack.com/apps