Select Topic AreaProduct Feedback BodyExpressions should have a way to write a condition. This could either be a ternary operator Original issue: actions/runner#409 |
Replies: 5 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. |
|
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 |
|
This is well known, but considered a poor solution due to the side effects. A real ternary operator is needed. |
|
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. |
|
Hi everyone, we just announced our new |
Hi everyone, we just announced our new
casefunction which is adds conditionals for expressions. Let us know if you have any feedback!