appleboy/telegram-action

Error when sending Unexpected input(s) 'if'

Resmedia opened this issue · 2 comments

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?

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 ^_^

Thank's yes i solved and update issue