-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (46 loc) · 1.83 KB
/
notifier.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Github to Telegram Notifier
on:
push:
pull_request:
types: [opened, closed, reopened]
issues:
types: [opened, pinned, closed, reopened]
jobs:
notifier:
runs-on: ubuntu-latest
steps:
- name: Notify on push
if: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip notifier]') }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
📢 ${{ github.actor }} pushed a commit:
- Message: ${{ github.event.commits[0].message }}
- Repository: ${{ github.repository }}
🔗 [View Changes](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
- name: Notify on pull request
if: ${{ github.event_name == 'pull_request' }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
🔄 ${{ github.actor }} ${{ github.event.action }} pull request
- Action: ${{ github.event.action }}
- Title: ${{ github.event.pull_request.title }}
- PR URL: ${{ github.event.pull_request.html_url }}
Repository: ${{ github.repository }}
- name: Notify on issue
if: ${{ github.event_name == 'issues' }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
📝 ${{ github.actor }} ${{ github.event.action }} issue
- Action: ${{ github.event.action }}
- Title: ${{ github.event.issue.title }}
- URL: ${{ github.event.issue.html_url }}
Repository: ${{ github.repository }}