We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
echo "output 1 ${{steps.teamAffiliation.outputs.isTeamMember == 'false'}}" echo "output 2 ${{steps.teamAffiliation.outputs.isTeamMember == 'true'}}" echo "output 3 ${{steps.teamAffiliation.outputs.isTeamMember == false}}" echo "output 4 ${{!steps.teamAffiliation.outputs.isTeamMember}}"
Really curious about this behavior, first noticed it when if returned false from false == false expression in checking conditions for step
if
false
false == false
The text was updated successfully, but these errors were encountered:
That is correct, outputs are always strings.
The behavior for comparisons in expressions is documented here (see the Note)
Note
If you want to force coercion to a boolean you can do something like this
echo "output 2 ${{ fromJSON(steps.teamAffiliation.outputs.isTeamMember) == true}}"
Some examples
echo ${{ false == 'false' }} # false echo ${{ 'false' == false }} # false echo ${{ fromJSON('false') == false }} # true
So it is always better to compare strings for equality
Apologies for the vagueness in the README that lead to this confusion I will add a note to make it more clear.
Sorry, something went wrong.
@glebviniarskii created issue #25 to make this clear.
Thank you for bringing this up
No branches or pull requests
Really curious about this behavior, first noticed it when
if
returnedfalse
fromfalse == false
expression in checking conditions for stepThe text was updated successfully, but these errors were encountered: