https://github.com/ironsource/action-slack-notification
A GitHub Action to send a message to a Slack channel.
https://github.com/ironsource/action-slack-notification
actions github-actions slack
Last synced: 2 months ago
JSON representation
A GitHub Action to send a message to a Slack channel.
- Host: GitHub
- URL: https://github.com/ironsource/action-slack-notification
- Owner: ironSource
- Created: 2021-12-08T11:03:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-18T14:18:45.000Z (over 4 years ago)
- Last Synced: 2025-10-03T16:37:14.979Z (9 months ago)
- Topics: actions, github-actions, slack
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# action-slack-notification
A [GitHub Action](https://github.com/features/actions) to send a message to a Slack channel.
## Example usage
Here is an example setup of this action:
```yml
name: Some Action
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
...
steps before
...
- name: Slack Notification
uses: AndyKIron/slack-notify@main
with:
channel: some-slack-channel
username: sender-name
message: "tour message here"
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
...
steps after
...
```
### Inputs (with)
| Variable | | Purpose |
|---------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------|
| channel | required | Slack channel name where you want sending message |
| username | required | Message sender name |
| icon_url | optional | URL to an image to use as the icon for this message. |
| status | optional | Message status (left border color). Values - good (green), warning (yellow), danger (red), or any hex color code (eg. #439FE0). Default - good |
| message | required | Message content like `" :rotating_light: *${{github.actor}}* do some wrong!"` (markdown supported) |
| slack_webhook | required | You can [generate a Slack incoming webhook token from here](https://slack.com/apps/A0F7XDUAZ-incoming-webhooks). |
- Create `SLACK_WEBHOOK` secret using [GitHub Action's Secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository).