Skip to content

Commit

Permalink
ci: notify
Browse files Browse the repository at this point in the history
  • Loading branch information
p0n1 committed Sep 25, 2024
1 parent 54a9e0c commit c13bc5c
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Telegram Notifications

on:
push:
branches: [ main ]
pull_request:
types: [ opened, closed, reopened ]
issues:
types: [ opened, closed, reopened ]
release:
types: [ published ]

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send Telegram Message on Push
if: github.event_name == 'push'
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
New push to ${{ github.repository }}
Commit message: ${{ github.event.head_commit.message }}
- name: Send Telegram Message 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.event.pull_request.title }} (${{ github.event.action }})
PR #${{ github.event.pull_request.number }}
${{ github.event.pull_request.html_url }}
- name: Send Telegram Message on Issue
if: github.event_name == 'issues'
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
Issue ${{ github.event.issue.title }} (${{ github.event.action }})
#${{ github.event.issue.number }}
${{ github.event.issue.html_url }}
- name: Send Telegram Message on Release
if: github.event_name == 'release'
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
New release published: ${{ github.event.release.tag_name }}
${{ github.event.release.name }}
${{ github.event.release.html_url }}

0 comments on commit c13bc5c

Please sign in to comment.