Replies: 4 comments 4 replies
-
In addition, the solution should support non-trivial use cases, Which breaks down into:
Since expressions are supposed to be reasonable simple, there is no need for a sophisticated solution. But some syntactical sugar would be nice. |
Beta Was this translation helpful? Give feedback.
-
There seems to be a way because there is "ternary like" operator in Github actions https://docs.github.com/en/actions/learn-github-actions/expressions#example . One thing to watch for is that "true value" (one after
|
Beta Was this translation helpful? Give feedback.
-
This is well known, but considered a poor solution due to the side effects. A real ternary operator is needed. |
Beta Was this translation helpful? Give feedback.
-
Following the docs I just wrote this (
Can you spot the problem? I didn't at first:
Very confusing at first, and a 'real' ternary if would have avoided it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
Expressions should have a way to write a condition. This could either be a ternary operator
<condition> ? <true value> : <false value>
or a functionif(<condition>, <true-value>, <false-value>)
.Original issue: actions/runner#409
Beta Was this translation helpful? Give feedback.
All reactions