Skip to content

Commit 358584c

Browse files
committed
Notify Telegram when CI job is canceled
1 parent 055e8a1 commit 358584c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ jobs:
3636
uses: coverallsapp/github-action@v1.1.2
3737
with:
3838
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
- name: Notify Telegram if job was cancelled
40+
if: ${{ cancelled() }}
41+
uses: appleboy/telegram-action@master
42+
env:
43+
REPO_URL: ${{ github.event.repository.html_url }}
44+
WORKFLOW_RUN_URL: ${{ github.event.workflow_run.html_url }}
45+
WORKFLOW_RUN_CREATED_AT: ${{ github.event.workflow_run.created_at }}
46+
with:
47+
to: ${{ secrets.TELEGRAM_TO }}
48+
token: ${{ secrets.TELEGRAM_TOKEN }}
49+
# https://emojipedia.org/
50+
message: |
51+
🛑 ❌ Repo: ${{ env.REPO_URL }}. ✖️ 💬
52+
Workflow run: ${{ env.WORKFLOW_RUN_URL }}
53+
Workflow run created at: ${{ env.WORKFLOW_RUN_CREATED_AT }}
54+

0 commit comments

Comments
 (0)