-
I have setup an environment variable using:
test.sh just echoes “SomeString, MoreString” In a step right after, I’m doing a if check to see the PROJECT_TO_TEST variable contains ‘SomeString’ and a dummy ‘ShouldNotRun’ like so:
In this case, only the “SomeString did exist and should run” should get printed, but “ShouldNotRun” is also getting printed. Full code here: https://github.com/gomfucius/github-actions/blob/master/.github/workflows/pullrequest.yml Workflow that illustrates the problem: https://github.com/gomfucius/github-actions/runs/590320131 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I had to remove the ${{}}, this works:
|
Beta Was this translation helpful? Give feedback.
-
Yeah, you are right. According to this document - When you use expressions in an if conditional, you do not need to use the expression syntax (${{ }}) because GitHub automatically evaluates the if conditional as an expression. |
Beta Was this translation helpful? Give feedback.
I had to remove the ${{}}, this works: