-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.15 KB
/
telegram-alert.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Telegram Alert
on:
push:
branches:
- "**"
pull_request:
branches:
- main
jobs:
alerts:
env:
repository: ${{ github.repository }}
event: ${{ github.event_name }} on ${{ github.ref_name }}
sha: ${{ github.sha }}
commit: ${{ github.event.head_commit.message }}
author: ${{ github.event.pusher.name }}
authorURL: https://github.com/${{ github.event.pusher.name }}
url: https://github.com/${{ github.repository }}
name: Telegram Alert
runs-on: ubuntu-latest
steps:
- name: Send message
id: telegram
uses: metalpoch/telegram-alerts-action@v1
with:
bot-token-id: ${{ secrets.BOT_TOKEN_ID }}
chat-id: ${{ secrets.CHAT_ID }}
disable-web-page-preview: true
text: "*Github Action Alert*\n\n
*⚙️ repository:* `${{env.repository }}`\n\n
*🎟️ Event:* `${{env.event }}`\n\n
*🔑 SHA:* `${{ env.sha }}`\n\n
*🗃️ Commit:* `${{ env.commit }}`\n\n
*👤 Author:* [${{ env.author }}](${{ env.authorURL }})\n\n
*🌐 URL:* [Github](${{env.url}})"