Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 10 days 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-11T18:25:48.000Z (about 2 years ago)
- Last Synced: 2024-03-15T09:49:55.390Z (11 months 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
[![Build & Test](https://github.com/chrimaeon/github-slack-action/actions/workflows/main.yml/badge.svg)](https://github.com/chrimaeon/github-slack-action/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/chrimaeon/github-slack-action/branch/main/graph/badge.svg?token=WNLO6DSWNC)](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