appleboy / telegram-action

GitHub Action that sends a Telegram message.
https://github.com/marketplace/actions/telegram-message-notify
MIT License
821 stars 105 forks source link

Error when sending Unexpected input(s) 'if' #18

Closed Resmedia closed 3 years ago

Resmedia commented 4 years ago

Hello!

I got problem today with sending, before all was fine.

My yml

name: telegram message
on: [push, pull_request]
jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
     - uses: actions/checkout@master

    #Request
     - name: Telegram Notify request
       if: ${{ github.event_name == 'pull_request' }}
       uses: appleboy/telegram-action@v0.0.8
       with:
         to: ${{ secrets.CHAT }}
         token: ${{ secrets.TOKEN }}
         args: User ${{github.actor}} in ${{ github.repository }} repository. Make ${{ github.event_name }}. Job ${{github.job}} URL - "${{ github.event.pull_request.title }} --> ${{ github.event.pull_request.html_url }}"

    #Push  
     - name: Telegram Notify push
       if: ${{ github.event_name == 'push' }}
       uses: appleboy/telegram-action@v0.0.8
       with:
         to: ${{ secrets.CHAT }}
         token: ${{ secrets.TOKEN }}
         args: User ${{github.actor}} in ${{ github.repository }} repository. Make ${{ github.event_name }}. Job ${{github.job}} URL - "${{ github.event.head_commit.message }} --> ${{ github.event.head_commit.url }}"

Errors:

Снимок экрана 2020-07-19 в 11 18 49

and

Снимок экрана 2020-07-19 в 11 19 37

Is there something wrong with me?

shockzort commented 3 years ago

Hey man. You have double if in #push first after "-name:" if: ${{ github.event_name == 'push'}} then after "token" if: ${{ github.event_name == 'push'}}

suppose this is solved by now, anyway this issue helped me out ^_^

Resmedia commented 3 years ago

Thank's yes i solved and update issue