Skip to content

Commit

Permalink
Update tele.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hglong16 authored Dec 12, 2023
1 parent 422d976 commit f821614
Showing 1 changed file with 34 additions and 27 deletions.
61 changes: 34 additions & 27 deletions .github/workflows/tele.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,44 @@
name: Telegram
name: Notification

on:
push:
branches: [main, master]
pull_request:
types: [opened, reopened, closed]
branches: [main, master]
branches:
- main
- master

jobs:
job:
if: ${{ !github.event.pull_request.merged }}
name: Build
deploy:
runs-on: ubuntu-latest
steps:
- name: send telegram message on push
uses: appleboy/telegram-action@master
- name: Checkout
uses: actions/checkout@v3

- name: Build and lint
run: |
echo "Build and lint"
- name: Notification Failure
if: failure()
uses: hunghg255/action-notifications@master
with:
to: ${{ secrets.CHATID }}
token: ${{ secrets.BOTTOKEN }}
message: |
${{ github.actor }} created #${{github.event.number}} on ${{ github.repository }}:
${{ github.event.head_commit.message }}
PR review: ${{github.event.pull_request.title}}
${{github.event.pull_request.body}}
https://github.com/${{ github.repository }}/commit/${{github.sha}}

telegram_bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram_chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
telegra_message_thread_id: $ {{ secrets.TELEGRAM_MESSAGE_THREAD_ID }}



merge:
if: ${{ github.event.pull_request.merged }}
name: Build
notifification:
needs: deploy
runs-on: ubuntu-latest

steps:
- name: send telegram message on push
uses: appleboy/telegram-action@master
- name: Notification Success
uses: hunghg255/action-notifications@master
if: always()
with:
to: ${{ secrets.CHATID }}
token: ${{ secrets.BOTTOKEN }}
message: |
${{ github.actor }} merged #${{github.event.number}} on ${{ github.repository }}
telegram_bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram_chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
telegra_message_thread_id: $ {{ secrets.TELEGRAM_MESSAGE_THREAD_ID }}


0 comments on commit f821614

Please sign in to comment.