# send notifications to telegram group on commits, releases, issues name: notifications on: pull_request: branches: - master push: branches: - master release: types: [published] issues: types: [opened] jobs: push: if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest strategy: matrix: commit: ${{ github.event.commits }} steps: # - name: debug # env: # DEBUG: ${{ toJSON(matrix.commit) }} # run: echo "$DEBUG" # write message to file - run: echo "${{ matrix.commit.message }}" >> message.txt - run: echo "" >> message.txt - run: echo "by ${{ matrix.commit.author.username }}" >> message.txt - run: echo "${{ matrix.commit.url }}" >> message.txt - run: date -d "${{ matrix.commit.timestamp }}" +"%d/%m/%y at %H:%M" >> message.txt # send message, @plebbit telegram chat id is -1001665335693 - name: "telegram notification" uses: appleboy/telegram-action@master with: to: -1001665335693 token: ${{ secrets.TELEGRAM_TOKEN }} # commit links don't show anything useful in preview disable_web_page_preview: true format: html message_file: message.txt release: if: ${{ github.event_name == 'release' }} runs-on: ubuntu-latest steps: # - name: debug # env: # DEBUG: ${{ toJSON(github) }} # run: echo "$DEBUG" # write message to file - run: echo "${{ github.event.repository.name }} ${{ github.event.release.name }}" >> message.txt - run: echo "" >> message.txt - run: echo "${{ github.event.release.body }}" >> message.txt - run: echo "${{ github.event.release.html_url }}" >> message.txt # send message, @plebbit telegram chat id is -1001665335693 - name: "telegram notification" uses: appleboy/telegram-action@master with: to: -1001665335693 token: ${{ secrets.TELEGRAM_TOKEN }} format: html message_file: message.txt issue: if: ${{ github.event_name == 'issues' }} runs-on: ubuntu-latest steps: # - name: debug # env: # DEBUG: ${{ toJSON(github) }} # run: echo "$DEBUG" # write message to file - run: echo "${{ github.event.issue.title }}" >> message.txt - run: echo "" >> message.txt - run: echo "by ${{ github.event.issue.user.login }}" >> message.txt - run: echo "${{ github.event.issue.html_url }}" >> message.txt # send message, @plebbit telegram chat id is -1001665335693 - name: "telegram notification" uses: appleboy/telegram-action@master with: to: -1001665335693 token: ${{ secrets.TELEGRAM_TOKEN }} format: html message_file: message.txt