Skip to content

Commit 65a1fe7

Browse files
committed
Send a Zulip notification when a cron job fails
1 parent 08c0ada commit 65a1fe7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,28 @@ jobs:
4040
4141
- name: Test
4242
run: bash ./ci.sh
43+
44+
# Send a Zulip notification when a cron job fails
45+
cron-fail-notify:
46+
name: cronjob failure notification
47+
runs-on: ubuntu-latest
48+
needs: [build]
49+
if: github.event_name == 'schedule' && (failure() || cancelled())
50+
steps:
51+
- name: Install zulip-send
52+
run: pip3 install zulip
53+
- name: Send Zulip notification
54+
shell: bash
55+
env:
56+
ZULIP_BOT_EMAIL: ${{ secrets.ZULIP_BOT_EMAIL }}
57+
ZULIP_API_TOKEN: ${{ secrets.ZULIP_API_TOKEN }}
58+
run: |
59+
~/.local/bin/zulip-send --stream miri --subject "Cron Job Failure $(date -uI)" \
60+
--message 'Dear @**RalfJ**,
61+
62+
The standard library test suite is failing under Miri. Would you mind investigating this issue?
63+
64+
Thanks in advance!
65+
Sincerely,
66+
The Miri Cronjobs Bot' \
67+
--user $ZULIP_BOT_EMAIL --api-key $ZULIP_API_TOKEN --site https://rust-lang.zulipchat.com

0 commit comments

Comments
 (0)