Navigation Menu

Skip to content

Error when comparing github.actor to string in if statement #27015

Discussion options

You must be logged in to vote

Hi @danielinclouds ,

The error is due to double quotes are used for username, please use single quote, code as below:

- name: Actor
        if: github.actor ==<font color="#FF0000">'</font>weide-zhou<font color="#FF0000">' <font color="#000000"># use '' to enclose username</font></font> env:
          ACTOR: ${{ github.actor }}
          PUSHER: ${{ github.event.pusher.name }}
        run: |
          echo "$ACTOR"
          echo "$PUSHER"

Thanks.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants