Description
Workflows using the labels: filter in the on: block (e.g., labels: [my-label]) fail on every push to the default branch with:
"This run likely failed because of a workflow file issue."
The labels: filter correctly shows unmatched label events as Skipped (⊘), but push events that re-evaluate the workflow file cause a Failed (❌) result instead.
Reproduction
- Create a workflow with an
issues: [labeled] trigger and a labels: filter:
on:
issues:
types: [labeled]
labels: [my-label]
- Compile with
gh aw compile
- Push any commit to the default branch (even one unrelated to the workflow file)
- Observe that the compiled
.lock.yml triggers a run on the push event and fails with a "workflow file issue" error
Expected Behavior
Push events should either:
- Not trigger the workflow at all (since
push is not a declared trigger), or
- Show as Skipped (⊘) rather than Failed (❌)
Actual Behavior
Every push to the default branch triggers a failed run for each workflow using the labels: filter. This creates significant noise in the Actions tab — repositories with multiple labels:-filtered workflows accumulate dozens of spurious failures per day.
Environment
Additional Context
The labels: key appears as a top-level entry under on: in the compiled .lock.yml file. GitHub Actions does not recognize this as a valid event type or filter, which likely causes the parse-level failure on push-triggered validation runs.
A possible fix would be to compile labels: into a job-level if: condition or into the existing activation job logic, so that GitHub Actions never encounters an unrecognized top-level key in the on: block.
Description
Workflows using the
labels:filter in theon:block (e.g.,labels: [my-label]) fail on every push to the default branch with:The
labels:filter correctly shows unmatched label events as Skipped (⊘), but push events that re-evaluate the workflow file cause a Failed (❌) result instead.Reproduction
issues: [labeled]trigger and alabels:filter:gh aw compile.lock.ymltriggers a run on thepushevent and fails with a "workflow file issue" errorExpected Behavior
Push events should either:
pushis not a declared trigger), orActual Behavior
Every push to the default branch triggers a failed run for each workflow using the
labels:filter. This creates significant noise in the Actions tab — repositories with multiplelabels:-filtered workflows accumulate dozens of spurious failures per day.Environment
Additional Context
The
labels:key appears as a top-level entry underon:in the compiled.lock.ymlfile. GitHub Actions does not recognize this as a valid event type or filter, which likely causes the parse-level failure on push-triggered validation runs.A possible fix would be to compile
labels:into a job-levelif:condition or into the existing activation job logic, so that GitHub Actions never encounters an unrecognized top-level key in theon:block.