summaryrefslogtreecommitdiffstats
path: root/.github/workflows/notify-telegram-pr.yml
blob: 28a0637ad74ca8e9923a7261a6af72faf89870d9 (plain) (blame)
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
name: notify-telegram-pr

on:
  pull_request_target:
    types: [opened, reopened]
  issues:
    types: [opened, reopened]
jobs:
  build:
    name: Notify Telegram
    runs-on: ubuntu-latest
    steps:
      - name: send telegram message on PR opened
        if: github.event.pull_request
        uses: appleboy/telegram-action@master
        with:
          to: ${{ secrets.TELEGRAM_TO }}
          token: ${{ secrets.TELEGRAM_TOKEN }}
          if: github.event.issue
          message: |
            ${{ github.actor }} created PR ${{ github.event.pull_request.title }}
            See changes: ${{ github.event.pull_request.html_url }}
      - name: send telegram message on issue opened
        if: github.event.issue
        uses: appleboy/telegram-action@master
        with:
          to: ${{ secrets.TELEGRAM_TO }}
          token: ${{ secrets.TELEGRAM_TOKEN }}
          if: github.event.issue
          message: |
            ${{ github.actor }} created issue ${{ github.event.issue.title }}
            See issue: ${{ github.event.issue.html_url }}