Error when evaluating 'runs-on' for job 'build'. (Line: X, Col: Y): Unexpected value ''

Hi All,
Over at Apache Commons IO, I am trying to build on Windows and Ubuntu per the docs, but I get:

Error when evaluating 'runs-on' for job 'build'. (Line: 23, Col: 14): Unexpected value ''

from this maven.yml:

name: Java CI

on: [push]


    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ matrix.experimental }}
        os: [ubuntu-latest, windows-latest]
        java: [ 8, 11, 14 ]
        experimental: [false]
          - java: 15-ea
            experimental: true        
      fail-fast: false
    - uses: actions/checkout@v2.3.1
    - name: Set up JDK ${{ }}
      uses: actions/setup-java@v1.4.0
        java-version: ${{ }}
    - name: Build with Maven
      run: mvn -V --file pom.xml --no-transfer-progress

See this run:

Any thoughts?

Thank you,

That additional matrix value lacks an os attribute, so I assume it defaults to empty.

That does not seem to do it:

The workflow is not valid. .github/workflows/maven.yml (Line: 24, Col: 5): 'runs-on' is already defined,.github/workflows/maven.yml (Line: 33, Col: 17): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.os

What am I missing in the syntax?

Two problems in that new workflow (the first is what that error message points out):

    runs-on: ubuntu-latest
    runs-on: ${{ matrix.os }}
  1. You can only have one runs-on. The one with matrix.os should be correct.
          - java: 15-ea
            os: ${{ matrix.os }}
            experimental: true
  1. You’re defining a new matrix element here, so you have to give an actual value for os. Within the matrix there is no matrix to reference. Try something like this:
          - java: 15-ea
            os: ubuntu-latest
            experimental: true

ok, ty! I have the build running:

Is there a way to run Java 15-ea without the include duplication in the YAML:

Not that I’m aware of, no.