https://github.com/jmpa-io/post-to-slack
🐋 A GitHub Action for sending notifications from running jobs to Slack (via a given webhook).
https://github.com/jmpa-io/post-to-slack
actions
Last synced: 5 months ago
JSON representation
🐋 A GitHub Action for sending notifications from running jobs to Slack (via a given webhook).
- Host: GitHub
- URL: https://github.com/jmpa-io/post-to-slack
- Owner: jmpa-io
- License: mit
- Created: 2022-03-28T02:49:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T20:12:40.000Z (over 1 year ago)
- Last Synced: 2025-07-11T18:46:21.017Z (12 months ago)
- Topics: actions
- Language: Makefile
- Homepage:
- Size: 7.54 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/jmpa-io/post-to-slack/actions/workflows/README.yml)
[](https://github.com/jmpa-io/post-to-slack/actions/workflows/cicd.yml)
# `post-to-slack`
```diff
+ 🐋 A GitHub Action for sending notifications from running jobs to Slack (via a
+ given webhook).
```
* Inspired by [`action-slack` by `8398a7`](https://github.com/8398a7/action-slack); Created using [this doc](https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/creating-a-docker-container-action) from GitHub.
## `usage`
General:
```yaml
- name: Post to Slack.
uses: jmpa-io/post-to-slack@main
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ job.status }}
```
> If you're unsure how to create the `${{ secrets.SLACK_WEBHOOK_URL }}`, see [this doc from Slack around creating a custom Slack App for your Slack workspace](ttps://api.slack.com/messaging/webhooks).
> If you're unsure how to retrieve the `${{ job.status }}`, see [this GitHub Action called `determine-workflow-conclusion`](https://github.com/jmpa-io/determine-workflow-conclusion).
With if conditionals ([see doc](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions)):
```yaml
- name: Post to Slack.
if: success() # accepts: success(), always(), cancelled(), failure()
uses: jmpa-io/post-to-slack@main
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ job.status }}
```
## `inputs`
### (required) `webhook`
The Slack webhook to post to. This is created / managed
by a custom Slack App in your Slack workspace.
### (required) `status`
The status of the running GitHub Action job.