Conditional on a job fails if double quotes are used
See original GitHub issueDescribe the bug Using double quotes in a conditional for a job results in
The workflow is not valid. <file_path>: Unexpected symbol: '"workflow_dispatch"'. Located at position 22 within expression: github.event_name != "workflow_dispatch"
To Reproduce Steps to reproduce the behavior:
- Create a job with a conditional
test-job:
name: Use double quotes
if: github.event_name != "workflow_dispatch"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- Run it
- See above mentioned error
- Use single quotes instead
if: github.event_name != 'workflow_dispatch'
, it works
Expected 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:6
Top Results From Across the Web
Why do options in a quoted variable fail, but work when ...
When you access the variable with a quoted substitution wget "$wget_options" , the value of the variable is used as a string.
Read more >Solution for find -exec if single and double quotes already ...
The proper fix is to pass the matching files as command-line arguments to the bash subprocess.
Read more >How to use Backticks and quotes when querying a MySQL ...
Using Backticks, Double Quotes, and Single Quotes when querying a MySQL database can be boiled down to two basic points: Quotes (Single and...
Read more >Filter with quotes as string - Microsoft Q&A
I have a filter condition in which it is given as string e.g, if columnName is firstname then filter condition is firstname =...
Read more >Job dependency scheduling
Use double quotes (") around job names that begin with a number. In Windows, enclose the dependency expression in double quotes (") when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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. 😃
@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.