skip to Main Content

I need to send message whenever i push into my repository on github.

The following code is in gihub actions
tg-notify.yml :

name: tg-notify
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Update status
      uses: appleboy/telegram-action@master
      with:
        to: ${{ secrets.TELEGRAM_TO }}
        token: ${{ secrets.TELEGRAM_TOKEN }}
        message: |  #https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context
         #Github_Updates:
         #Push_Commit ⚒:
          ${{ github.event_name }} commit in ${{ github.repository }} by "${{ github.actor }}". [${{github.sha}}@${{ github.ref }}]

I need to edit this code in order to send the message into telegram group.
NOTE: TELEGRAM_TO is the id of the person getting that message i have tried to replace it by group chat id but the problem is the message is sent to general topic.
is there a way to send that message in specific topic inside that group?

2

Answers


  1. Chosen as BEST ANSWER

    I have figured out that the bot must have admin access to send message to that group.
    Also the group chat id starts with a dash (-).


  2. did you manage to find a way to send notifications from github actions to a specific topic and not to the main chat?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search