Skip to content

bug: gh aw compile should validate required workflows: field on workflow_run trigger #33188

@Calidus

Description

@Calidus

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

  1. Create an agentic workflow .md with this on: block:
    on:
      workflow_run:
        types: [completed]
        branches:
          - master
    (Note: no workflows: key)
    
  2. Run gh aw compile (even with --strict)
  3. Compilation succeeds and produces a .lock.yml
  4. 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


Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions