st-tu-dresden/salespoint

Invalid workflow file .github/workflows/build.yaml

Closed this issue · 2 comments

Our build.yaml file is broken according to a recent PR build:

Invalid workflow file: .github/workflows/build.yaml#L1
The workflow is not valid. .github/workflows/build.yaml: Unexpected tag '!main'

This expression probably just needs quotation marks.

It turns out the configuration is still kind of broken. If I push to a branch other than main and do not associate it with a PR, no build will be triggered.

The reasons seems to be that our branches filter only contains patterns beginning with !. According to the GH actions docs we should either use branches-ignore or include a pattern without a ! :

If you define a branch with the ! character, you must also define at least one branch without the ! character. If you only want to exclude branches, use branches-ignore instead. Similarly, if you define a tag with the ! character, you must also define at least one tag without the ! character. If you only want to exclude tags, use tags-ignore instead.