Skip to content

Conditional on a job fails if double quotes are used #866

@djolez

Description

@djolez

Describe 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:

  1. 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
  1. Run it
  2. See above mentioned error
  3. 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

Metadata

Metadata

Labels

Service BugBug fix scope to the pipelines service and launch app

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions