Skip to content

Instantly share code, notes, and snippets.

@mdellavo
Last active September 5, 2019 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdellavo/578d927fd490efc2221facb644eae1aa to your computer and use it in GitHub Desktop.
Save mdellavo/578d927fd490efc2221facb644eae1aa to your computer and use it in GitHub Desktop.
A simple host based step for github actions to post to slack, no docker needed
- name: Build failure
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ...
run: |
curl -X POST \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-d channel=$SLACK_CHANNEL \
-d text='[${{ github.repository }}] ${{ github.event.ref }} *FAILED*' \
https://slack.com/api/chat.postMessage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment