Skip to content

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

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

Open
gschwaer opened this issue Jan 29, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@gschwaer
Copy link

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.

@gschwaer gschwaer added the enhancement New feature or request label Jan 29, 2024
@felipesu19 felipesu19 added bug Something isn't working and removed enhancement New feature or request labels May 31, 2024
@felipesu19
Copy link
Contributor

Switched this to a bug, since i think that fits better

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
Status: Backlog 🗒
Development

No branches or pull requests

2 participants