-
Notifications
You must be signed in to change notification settings - Fork 86
35 lines (31 loc) · 1.14 KB
/
notify.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
name: telegram notify
on:
pull_request:
types: [ closed ]
jobs:
merge_job:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.CHAT_ID }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: "The ${{github.event_name}} '${{github.event.pull_request.title}}' (#${{github.event.number}}) was merged.
\nLink: ${{github.event.pull_request.html_url}}
\nDescription: ${{github.event.pull_request.body}}
\n
\nCheck it out to keep your local repository updated."
close_job:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.CHAT_ID }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: The ${{github.event_name}} ${{github.event.pull_request.title}} (${{github.event.number}}) was closed.