Skip to content

Commit 1e300dc

Browse files
author
vsilent
committed
set telegram notifications on git and project activities
1 parent ff7a7c1 commit 1e300dc

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/git.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Githubflow
2+
3+
on:
4+
push:
5+
# Publish `master` as Docker `latest` image.
6+
branches:
7+
- master
8+
9+
# Publish `v1.2.3` tags as releases.
10+
tags:
11+
- v*
12+
13+
# Run tests for any PRs.
14+
pull_request:
15+
16+
jobs:
17+
notify:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Send notifications to Telegram
21+
run: curl -s -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage -d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -d text="${MESSAGE}" >> /dev/null
22+
env:
23+
MESSAGE: "Issue ${{ github.event.action }}: \n${{ github.event.issue.html_url }}"

.github/workflows/project.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: project-telegram-notification
2+
3+
on:
4+
issues:
5+
types: [opened, reopened, deleted, closed]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Send notifications to Telegram
12+
run: curl -s -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage -d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -d text="${MESSAGE}" >> /dev/null
13+
env:
14+
MESSAGE: "Issue ${{ github.event.action }}: \n${{ github.event.issue.html_url }}"
15+

0 commit comments

Comments
 (0)