Strange boolean evaluation rules #25645
-
I’m trying to understand boolean expressions in GitHub actions. The documentation gives the following example of literals of different types, including boolean as Following their lead I use the following step with an
The output is as follows:
The plain output is as expected, showing What’s going on here? Possibly variables in the env context get coerced to strings, but that still doesn’t explain all the results. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Consider this (node):
To do what you’re trying to do, you’d probably want something like:
|
Beta Was this translation helpful? Give feedback.
-
Technically Practically, while it says they’re environment variables, it doesn’t actually say they’re strings, it just kinda assumes you’d figure that out. If it were my project, I wouldn’t object to someone filing a bug/PR asking for the term (It isn’t my project.) |
Beta Was this translation helpful? Give feedback.
env
defines strings.Consider this (node):
To do what you’re trying to do, you’d probably want something like: