Skip to content

๐Ÿ‹ A GitHub Action for sending notifications from running jobs to Slack (via a given webhook).

License

Notifications You must be signed in to change notification settings

jmpa-io/post-to-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

README.yml cicd.yml

post-to-slack

+ ๐Ÿ‹ A GitHub Action for sending notifications from running jobs to Slack (via a
+ given webhook).

usage

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 called determine-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 }}

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.

About

๐Ÿ‹ A GitHub Action for sending notifications from running jobs to Slack (via a given webhook).

Topics

Resources

License

Stars

Watchers

Forks