-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (53 loc) · 2.42 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
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
name: Notify
on:
push:
tags:
- '**'
env:
MMX_TELEGRAM_TOKEN: ${{ secrets.MMX_TELEGRAM_TOKEN }}
MMX_TELEGRAM_TO_1: ${{ secrets.MMX_TELEGRAM_TO_1 }}
MMX_TELEGRAM_TO_2: ${{ secrets.MMX_TELEGRAM_TO_2 }}
DISCORD_WEBHOOK: ${{ secrets.MMX_DISCORD_WEBHOOK }}
jobs:
notify:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT
- name: Telegram notification
if: ${{ env.MMX_TELEGRAM_TO_1 != '' }} && ${{ env.MMX_TELEGRAM_TOKEN != '' }}
uses: appleboy/telegram-action@master
with:
to: ${{ env.MMX_TELEGRAM_TO_1 }}
token: ${{ env.MMX_TELEGRAM_TOKEN }}
format: html
message: |
MMX Node ${{ steps.get_version.outputs.VERSION }} (with compressed plot support)
${{ github.event.repository.url }}/releases/${{ steps.get_version.outputs.VERSION }}
<a href="https://t.me/mmx_node">Telegram channel</a>
<a href="https://t.me/mmx_node_chat">Telegram chat</a>
<a href="https://t.me/mmx_node_chat_ru">Telegram chat[RU]</a>
<a href="https://discord.gg/tCwevssVmY">Discord</a>
- name: Telegram notification
if: ${{ env.MMX_TELEGRAM_TO_2 != '' }} && ${{ env.MMX_TELEGRAM_TOKEN != '' }}
uses: appleboy/telegram-action@master
with:
to: ${{ env.MMX_TELEGRAM_TO_2 }}
token: ${{ env.MMX_TELEGRAM_TOKEN }}
format: html
message: |
MMX Node ${{ steps.get_version.outputs.VERSION }} (with compressed plot support)
${{ github.event.repository.url }}/releases/${{ steps.get_version.outputs.VERSION }}
<a href="https://t.me/mmx_node">Telegram channel</a>
<a href="https://t.me/mmx_node_chat">Telegram chat</a>
<a href="https://t.me/mmx_node_chat_ru">Telegram chat[RU]</a>
<a href="https://discord.gg/tCwevssVmY">Discord</a>
- name: Discord notification
if: ${{ env.DISCORD_WEBHOOK != '' }}
uses: Ilshidur/action-discord@master
with:
args: |
MMX Node ${{ steps.get_version.outputs.VERSION }} (with compressed plot support)
${{ github.event.repository.url }}/releases/${{ steps.get_version.outputs.VERSION }}