Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting "Unexpected value ''" error in this GitHub action?

I have a GitHub action step like this (extracted from a larger test.yml file):

    steps:
    - name: Parse
      shell: bash
      env:
        TYPE: ${{matrix.package-type}}
        BV: ${{matrix.builder-version}}
        # This comment is line 63, the "#" is in column 9
        NULL: ${{ matrix.beta-version }}
      run: |
        echo TYPE is "$TYPE"
        echo BV is "$BV"
        printf "Null is '%s'\n" "$NULL"

When I run it, I get the following error:

The workflow is not valid. .github/workflows/test.yml (Line: 64, Col: 9): Unexpected value ''

Why is this line invalid? How do I fix it?

like image 457
Old Pro Avatar asked Apr 19 '26 01:04

Old Pro


1 Answers

If you're using a reusable workflow, make sure you're not passing runs-on to the job that uses the workflow. The runs-on is contained in the workflow file itself, not in the top level job.

The workflow is not valid. .github/workflows/REDACTED.yml (Line: 123, Col: 5): Unexpected value 'uses' .github/workflows/REDACTED.yml (Line: 124, Col: 5): Unexpected value 'with'


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!