Skip to content

Job is not adhering to the if check #24987

Answered by airtower-luna
tsposato asked this question in Actions
Discussion options

You must be logged in to vote
tsposato:
    if: ${{ needs.Check_For_Existing_Image.outputs.BUILD }} == 'YES'

The problem is that you have only part of your conditional wrapped in ${{ ... }}. That way only the wrapped part is evaluated as an expression, resulting in a string like NO == 'YES'. And a non-empty string evaluates to true.

For an if it’s easiest to just remove the ${{ ... }} part:

    if: needs.Check_For_Existing_Image.outputs.BUILD == 'YES'

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