Skip to content

Missing expression syntax or escaping for if: ! expr is not detected #290

@gschwaer

Description

@gschwaer

The following is not validated (from github docs):

You must always use the ${{ }} expression syntax or escape with '', "", or () when the expression starts with !, since ! is reserved notation in YAML format. For example:

if: ${{ ! startsWith(github.ref, 'refs/tags/') }}

For more information, see "Expressions."

Currently, this will not be detected as a bug:

if: ! startsWith(github.ref, 'refs/tags/')

The runner will abort with:

The workflow is not valid. .github/workflows/build.yml: (Line: 42, Col: 42, Idx: 420) - (Line: 42, Col: 43, Idx: 421): While parsing a tag, did not find expected tag URI.

It should be linted as an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog 🗒

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions