gh aw compile should validate required workflows: field on workflow_run trigger
Summary
gh aw compile --strict silently produces a valid .lock.yml file even when the .md source defines a workflow_run trigger without the required workflows: field. GitHub Actions immediately rejects the resulting workflow with:
on.workflow_run does not reference any workflows.
The compiler should catch this at compile time rather than letting it ship broken.
Reproduction
- Create an agentic workflow
.md with this on: block:
on:
workflow_run:
types: [completed]
branches:
- master
(Note: no workflows: key)
- Run gh aw compile (even with --strict)
- Compilation succeeds and produces a .lock.yml
- Push to GitHub — every run fails immediately with 0 jobs and the validation error above
Expected behavior
gh aw compile should error (especially in strict mode) when on.workflow_run is missing the workflows: field, since the resulting workflow file can never successfully trigger.
References
gh aw compileshould validate requiredworkflows:field onworkflow_runtriggerSummary
gh aw compile --strictsilently produces a valid.lock.ymlfile even when the.mdsource defines aworkflow_runtrigger without the requiredworkflows:field. GitHub Actions immediately rejects the resulting workflow with:The compiler should catch this at compile time rather than letting it ship broken.
Reproduction
.mdwith thison:block:Expected behavior
gh aw compile should error (especially in strict mode) when on.workflow_run is missing the workflows: field, since the resulting workflow file can never successfully trigger.
References