https://github.com/dataesr/slack-notifier-action
This action allows to send a message in slack channels in a github actions pipeline.
https://github.com/dataesr/slack-notifier-action
Last synced: 5 months ago
JSON representation
This action allows to send a message in slack channels in a github actions pipeline.
- Host: GitHub
- URL: https://github.com/dataesr/slack-notifier-action
- Owner: dataesr
- License: mit
- Created: 2021-06-04T15:38:07.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-04T15:48:54.000Z (about 5 years ago)
- Last Synced: 2025-09-11T10:27:02.337Z (9 months ago)
- Language: JavaScript
- Size: 181 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slack-notifier-action
This actions allows to send a message in slack channels in a github actions pipeline.
It uses github workflow context to display a formatted message on a selected slack channel.
## Inputs
| Name | Required | Description |
| ---- | -------- | ----------- |
| **github_token** | _required_ | Your github token. Usually use `${{ secrets.GITHUB_TOKEN }}`.
| **slack_token** | _required_ | Your slack bot token. Set it as a secret and use it as `${{ secrets.SLACK_TOKEN }}`
| **slack_channel** | _required_ | A slack channel to publish the message.
| **report_jobs** | _optional_ | If `true`, reports the status of all jobs. **Default**: `true`
| **deployment_url** | _optional_ | If provided, adds a button that links to an app deployment. **Default**: ""
*Only printed if workflow is successfull*
## Usage
```yaml
name: Production deployment
on: [push]
jobs:
hello_job1:
runs-on: ubuntu-latest
name: A job to say hello 1
steps:
- run: echo 'hello'
hello_job2:
runs-on: ubuntu-latest
name: A job to say hello 2
steps:
- run: echo 'hello'
hello_world_job:
needs:
- hello_job1
- hello_job2
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dataesr/slack-notifier-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN}}
slack_token: ${{ secrets.SLACK_TOKEN }}
slack_channel: '#'
deployment_url: ''
```
Slack message:
