Dynamic matrix yaml syntax error

I’m suddenly getting “You have an error in your yaml syntax” when using a dynamically generated matrix.

Even the example given from the fromJson docs is saying there’s a syntax error.

It says it’s in job2 where the matrix is defined, but I don’t see a problem.

name: test
on: push

jobs:
  job1:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
    - id: set-matrix
      run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"

  job2:
    needs: job1
    runs-on: ubuntu-latest
    strategy:
      matrix: ${{fromJson(needs.job1.outputs.matrix)}}
    steps:
    - run: echo hello
6 Likes

+1 Been going crazy for the last hour trying to figure out how I was able to break this.

1 Like

Same here. Our GitHub Actions broke without any change from our side.

1 Like

We are having problems as well

1 Like

@sindrig @croydon @jvisker This started working again for me this morning. I didn’t make any changes on my end. Would be nice to get some kind of explanation from GitHub, but I feel like this didn’t affect enough users for them to make a statement.

3 Likes

Same for us. I opened a ticket with GitHub support last night and got a reply 4 hours later that they thought this was fixed.

I asked them for an explanation but have not received anything. I’ll update here if I get an answer.

2 Likes

This should be fixed now, unfortunately there was a very brief time window when the parser reported a syntax error for this.

1 Like