Skip to content

Commit d308c5f

Browse files
authored
send a slack notification on ci failure (#245)
1 parent 6b2d604 commit d308c5f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/makefile.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,16 @@ jobs:
4949
DEBUG: 1
5050
timeout-minutes: 200
5151
run: make test-ci-all
52+
53+
- name: Send a Slack notification
54+
if: failure() || github.event_name != 'pull_request'
55+
uses: ravsamhq/notify-slack-action@v2
56+
with:
57+
status: ${{ job.status }}
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
notification_title: "{workflow} has {status_message}"
60+
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
61+
footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Workflow run>"
62+
notify_when: "failure"
63+
env:
64+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)