-
Notifications
You must be signed in to change notification settings - Fork 3
93 lines (83 loc) · 2.81 KB
/
notifications.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# send notifications to telegram group on commits, releases, issues
name: notifications
on:
pull_request:
branches:
- master
# push:
# branches:
# - master
release:
types: [published]
issues:
types: [opened]
jobs:
# push:
# if: ${{ github.event_name == 'push' }}
# runs-on: ubuntu-latest
# strategy:
# matrix:
# commit: ${{ github.event.commits }}
# steps:
# # - name: debug
# # env:
# # DEBUG: ${{ toJSON(matrix.commit) }}
# # run: echo "$DEBUG"
# # write message to file
# - run: echo "<code>${{ matrix.commit.message }}</code>" >> message.txt
# - run: echo "" >> message.txt
# - run: echo "by <i>${{ matrix.commit.author.username }}</i>" >> message.txt
# - run: echo "${{ matrix.commit.url }}" >> message.txt
# - run: date -d "${{ matrix.commit.timestamp }}" +"%d/%m/%y at %H:%M" >> message.txt
# # send message, @plebbit telegram chat id is -1001665335693
# - name: "telegram notification"
# uses: appleboy/telegram-action@master
# with:
# to: -1001665335693
# token: ${{ secrets.TELEGRAM_TOKEN }}
# # commit links don't show anything useful in preview
# disable_web_page_preview: true
# format: html
# message_file: message.txt
release:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
steps:
# - name: debug
# env:
# DEBUG: ${{ toJSON(github) }}
# run: echo "$DEBUG"
# write message to file
- run: echo "<b>${{ github.event.repository.name }} ${{ github.event.release.name }}</b>" >> message.txt
- run: echo "" >> message.txt
- run: echo "${{ github.event.release.body }}" >> message.txt
- run: echo "${{ github.event.release.html_url }}" >> message.txt
# send message, @plebbit telegram chat id is -1001665335693
- name: "telegram notification"
uses: appleboy/telegram-action@master
with:
to: -1001665335693
token: ${{ secrets.TELEGRAM_TOKEN }}
format: html
message_file: message.txt
issue:
if: ${{ github.event_name == 'issues' }}
runs-on: ubuntu-latest
steps:
# - name: debug
# env:
# DEBUG: ${{ toJSON(github) }}
# run: echo "$DEBUG"
# write message to file
- run: echo "<code>${{ github.event.issue.title }}</code>" >> message.txt
- run: echo "" >> message.txt
- run: echo "by <i>${{ github.event.issue.user.login }}</i>" >> message.txt
- run: echo "${{ github.event.issue.html_url }}" >> message.txt
# send message, @plebbit telegram chat id is -1001665335693
- name: "telegram notification"
uses: appleboy/telegram-action@master
with:
to: -1001665335693
token: ${{ secrets.TELEGRAM_TOKEN }}
format: html
message_file: message.txt