Skip to content

Commit c73206e

Browse files
committed
ci: add Telegram notification workflow
1 parent 3e7511e commit c73206e

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Telegram Notifications
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
pull_request:
7+
types: [opened]
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
notify:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Notify on new Issue
16+
if: github.event_name == 'issues'
17+
uses: appleboy/telegram-action@v1.0.1
18+
with:
19+
to: ${{ secrets.TELEGRAM_CHAT_ID }}
20+
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
21+
format: markdown
22+
message: |
23+
🐛 *New Issue* in [${{ github.repository }}](https://github.com/${{ github.repository }})
24+
25+
*#${{ github.event.issue.number }}* [${{ github.event.issue.title }}](${{ github.event.issue.html_url }})
26+
Opened by: ${{ github.event.issue.user.login }}
27+
28+
- name: Notify on new Pull Request
29+
if: github.event_name == 'pull_request'
30+
uses: appleboy/telegram-action@v1.0.1
31+
with:
32+
to: ${{ secrets.TELEGRAM_CHAT_ID }}
33+
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
34+
format: markdown
35+
message: |
36+
🔀 *New Pull Request* in [${{ github.repository }}](https://github.com/${{ github.repository }})
37+
38+
*#${{ github.event.pull_request.number }}* [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
39+
By: ${{ github.event.pull_request.user.login }} → `${{ github.event.pull_request.base.ref }}`
40+
41+
- name: Notify on new Release
42+
if: github.event_name == 'release'
43+
uses: appleboy/telegram-action@v1.0.1
44+
with:
45+
to: ${{ secrets.TELEGRAM_CHAT_ID }}
46+
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
47+
format: markdown
48+
message: |
49+
🚀 *New Release* in [${{ github.repository }}](https://github.com/${{ github.repository }})
50+
51+
[${{ github.event.release.tag_name }}](${{ github.event.release.html_url }}) — ${{ github.event.release.name }}

0 commit comments

Comments
 (0)