+ ๐ A GitHub Action for sending notifications from running jobs to Slack (via a
+ given webhook).
- Inspired by
action-slack
by8398a7
; Created using this doc from GitHub.
General:
- 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.
If you're unsure how to retrieve the
${{ job.status }}
, see this GitHub Action calleddetermine-workflow-conclusion
.
With if conditionals (see doc):
- 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 }}
The Slack webhook to post to. This is created / managed by a custom Slack App in your Slack workspace.
The status of the running GitHub Action job.