-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
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
Incorrect logic for if
for success() || failure()
#367
Comments
Note that this causes all |
I don't believe that your statement is correct, just tested this scenario and the job run after a the workflow has been cancelled. Even while it should be skipped.
Also known as if: ${{ format('{0} || {1}', success(), failure()) }} Is always a non empty string, non empty strings are truthy. Due to the usage of There is no evidence that GitHub tried to fix this Good ways to write the intended meaning is to use one of # ok no implicit format to merge multiple scalar expressions
if: ${{ success() || failure() }}
# ok no expression notation, implicit expression
if: success() || failure() |
Here is the relevant source code of the actions/runner template engine: Single vs. multiple Segments of |
I don't believe this is correct - if a workflow is canceled, this will not evaluate to
true
.The text was updated successfully, but these errors were encountered: