Skip to content
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

expecting a string with a ${{..}} expression or matrix error #205

Closed
pcassaretto-cmc opened this issue Aug 26, 2022 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@pcassaretto-cmc
Copy link

pcassaretto-cmc commented Aug 26, 2022

When using the following expression

strategy:
      matrix: ${{ fromJson(format('{{ "include"{0} [{{ "project"{0} "{1}" }}] }}',':',github.event.inputs.product)) }}

get the following error

expecting a string with ${{...}} expression or matrix, but found plain text node [syntax-check]

The expression works fine and will create a job instance for the single item?

Using actionlint via https://github.com/reviewdog/action-actionlint using release v.1.28.0 which uses actionlint 1.6.16

@pcassaretto-cmc
Copy link
Author

Here is an action that can be manually invoked which will reproduce the issue

name: test manual invocation
on:
  workflow_dispatch:
    inputs:
      product:
        description: "The product for which to run this workflow"
        required: true

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix: ${{ fromJson(format('{{ "include"{0} [{{ "project"{0} "{1}" }}] }}',':',github.event.inputs.product)) }}

    steps:
      - uses: actions/[email protected]
      - run: |
          echo the project value is ${{ matrix.project }}

@rhysd rhysd added the bug Something isn't working label Aug 28, 2022
@rhysd rhysd closed this as completed in b766843 Aug 28, 2022
@rhysd
Copy link
Owner

rhysd commented Aug 28, 2022

This was fixed in v1.6.17.

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
None yet
Development

No branches or pull requests

2 participants