Skip to content

Reusable github Actions for sending Telegram notifications on PR events

Notifications You must be signed in to change notification settings

domengabrovsek/github-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 

Repository files navigation

github-actions πŸ€–

GitHub Actions that I reuse in other repos to send messages regarding updates to my Telegram bot. πŸ“±

Setup πŸ”§

Add these secrets to your repository (Settings β†’ Secrets β†’ Actions):

  • TELEGRAM_API_URL - The webhook URL for your Telegram bot API
  • TELEGRAM_CHAT_ID - Default Telegram chat ID where messages will be sent

Workflows πŸš€

Send Telegram Message πŸ’¬

Sends a custom message to Telegram.

jobs:
  notify:
    uses: domengabrovsek/github-actions/.github/workflows/send-telegram-message.yml@master
    with:
      message: "Your message here"
      # Optional: Override default chat_id from TELEGRAM_CHAT_ID secret
      # chat_id: "987654321"

PR Opened Notification πŸŽ‰

Sends a notification when a PR is opened.

jobs:
  pr-opened:
    uses: domengabrovsek/github-actions/.github/workflows/pr-opened.yml@master

PR Updated Notification πŸ”„

Sends a notification when changes are pushed to a PR.

jobs:
  pr-updated:
    uses: domengabrovsek/github-actions/.github/workflows/pr-updated.yml@master

PR Merged Notification βœ…

Sends a notification when a PR is merged.

jobs:
  pr-merged:
    uses: domengabrovsek/github-actions/.github/workflows/pr-merged.yml@master

Example: Full PR Notifications πŸ“‹

name: Notifications

on:
  pull_request:
    types: [opened, closed, synchronize]
    branches: [main, master]

jobs:
  pr-opened:
    if: github.event.action == 'opened'
    uses: domengabrovsek/github-actions/.github/workflows/pr-opened.yml@master

  pr-updated:
    if: github.event.action == 'synchronize'
    uses: domengabrovsek/github-actions/.github/workflows/pr-updated.yml@master

  pr-merged:
    if: github.event.action == 'closed' && github.event.pull_request.merged == true
    uses: domengabrovsek/github-actions/.github/workflows/pr-merged.yml@master

About

Reusable github Actions for sending Telegram notifications on PR events

Topics

Resources

Stars

Watchers

Forks