Skip to content

Error thrown in consuming workflows regarding JSON output values quotes #464

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

Open
avaly opened this issue Apr 8, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@avaly
Copy link

avaly commented Apr 8, 2025

Describe the bug

Quotes in a reusable workflow's JSON output value is triggering an error in consuming workflows.

To Reproduce

Steps to reproduce the behavior:

  1. Create a reusable workflow with input and outputs, one of the output being this JSON value:
    outputs:
      images:
        value: '{"gcp": "${{ contains(inputs.registries, ''gcp'') && jobs.setup.outputs.gcp_image || '''' }}", "ecr": "${{ contains(inputs.registries, ''ecr'') && jobs.setup.outputs.ecr_image || ''''  }}"}'
  1. Use the first workflow in another workflow:
  build:
    uses: acme/actions/.github/workflows/build.yaml@v1
  1. See the following errors in the 2nd workflow file, but at the line number from the 1st workflow file:
Unexpected symbol: 'gcp'''. Located at position 31 within expression: contains(inputs.registries, ''gcp'') && jobs.setup.outputs.gcp_image || '''' [Ln 72, Col 26]
Unexpected symbol: 'ecr'''. Located at position 31 within expression: contains(inputs.registries, ''ecr'') && jobs.setup.outputs.ecr_image || '''' [Ln 72, Col 120]

Expected behavior

The 1st workflow does not throw any errors when being run in Github Actions runners, so I'd expect no errors to be printed by this extension.

Extension Version

v0.27.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog 🗒
Development

No branches or pull requests

1 participant