Why does `if: !startsWith(github.ref, 'refs/tags/')` break the workflow file?
IntermediateConceptJobs, Steps, Matrix & Concurrency
Answer
In YAML, a value starting with ! is a tag indicator, so the parser fails or misreads it. Wrap it:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
or quote it: if: "!startsWith(github.ref, 'refs/tags/')". Same issue for values starting with * or &.
More on Jobs, Steps, Matrix & Concurrency
How does `needs` work, and what happens to a job whose dependency failed or was skipped?BeginnerWhat is the implicit `success()` in a job `if`, and why is `always()` usually the wrong fix?IntermediateWhat values can `needs.<job>.result` take?BeginnerHow does a matrix expand, and how are job names generated?BeginnerHow do `include` and `exclude` work in a matrix?IntermediateWhat do `fail-fast` and `max-parallel` do?Beginner