-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conditional on a job fails if double quotes are used #866
Comments
Github related issue [#866](actions/runner#866)
Hi! |
GHA doesn’t like double quotes here apparently actions/runner#866
Ran into this as well #834 (comment) 😕 |
@djolez @solarmosaic-kflorence
myString: ${{ 'Mona the Octocat' }} I just experienced this problem and it was quite inconvenient to debug. I thought single or double quotes didn't matter. I know actions use YAML syntax but I'm not clear what syntax Expressions use. It would be great if it's possible to allow the use of both types of quotes inside Expressions. I'll include this in case it helps anyone debug. In my case the action failed with a status
Here is the line of code responsible: if: contains(github.event.head_commit.message, "--t") Here is the same line with single quotes. This works: if: contains(github.event.head_commit.message, '--t') |
@drecali I'm aware that the documentation mentions only single quote is valid (after the fact, of course). However, I think that behavior is not intuitive, since double quotes are valid throughout the rest of the YAML syntax. Unless there is a good reason not to support double quotes, it should be fixed. |
@solarmosaic-kflorence |
It seems github action only accept single-quotes: actions/runner#866 PiperOrigin-RevId: 419596027
It seems github action only accept single-quotes: actions/runner#866 PiperOrigin-RevId: 419596027
It seems github action only accept single-quotes: actions/runner#866 PiperOrigin-RevId: 420270640
GitHub Actions only support the use of single quotes for strings in expression language, not double quotes (see docs). This is an intentional limitation (at least for now) and is not something that can be fixed in the runner application. Therefore, I'm going to close this issue, and you feel free to create a feature request on the GitHub Community Support Forum which is actively monitored. Using the forum ensures that we route your feature request to the correct team. 😃 |
* ci: fix workflow dispatch getting cancelled workaround for daily release not running. skip number of commits check on manual experimental release. * ci: use single quote actions/runner#866 * ci: fix no release note on day after no commit use last tag instead of last date on fromTag * ci: always show changelog * ci: try using cat * ci: update existing release
Describe the bug
Using double quotes in a conditional for a job results in
To Reproduce
Steps to reproduce the behavior:
if: github.event_name != 'workflow_dispatch'
, it worksExpected behavior
Job should pass regardless of type of quotes used
Runner Version and Platform
2.274.2
OS of the machine running the runner? Ubuntu 18.04
What's not working?
N/A
Job Log Output
N/A
Runner and Worker's Diagnostic Logs
N/A
The text was updated successfully, but these errors were encountered: