Last active
September 5, 2019 17:20
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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