According to Frontmatter Reference | GitHub Agentic Workflows, the on.needs property should allow specification of additional custom workflow jobs that pre_activation and activation should depend on.
on:
# Explicit additional custom workflow jobs that pre_activation and activation
# should depend on.
# (optional)
needs: []
# Array of strings
When specifying this property, the pre_activation and activation jobs do gain the job in their needs lists, but the on.needs property is also emitted into the workflow, which is invalid.
repro-on-needs-bug.md
---
on:
needs: [custom_job]
workflow_dispatch:
jobs:
custom_job:
runs-on: ubuntu-slim
steps:
- shell: bash
run: echo "Hello from custom_job"
---
# Repro on.needs Bug
This workflow reproduces the on.needs bug where that property is emitted into the compiled workflow, leading to a workflow syntax error.
Expected Result
name: "Repro on.needs Bug"
"on":
workflow_dispatch:
inputs:
aw_context:
default: ""
description: Agent caller context (used internally by Agentic Workflows).
required: false
type: string
permissions: {}
concurrency:
group: "gh-aw-${{ github.workflow }}"
run-name: "Repro on.needs Bug"
jobs:
activation:
needs:
- custom_job
- pre_activation
# ...
agent:
needs:
- activation
- custom_job
# ...
pre_activation:
needs: custom_job
# ...
Actual Result
name: "Repro on.needs Bug"
"on":
needs:
- custom_job
workflow_dispatch:
inputs:
aw_context:
default: ""
description: Agent caller context (used internally by Agentic Workflows).
required: false
type: string
permissions: {}
concurrency:
group: "gh-aw-${{ github.workflow }}"
run-name: "Repro on.needs Bug"
jobs:
activation:
needs:
- custom_job
- pre_activation
# ...
agent:
needs:
- activation
- custom_job
# ...
pre_activation:
needs: custom_job
# ...
According to Frontmatter Reference | GitHub Agentic Workflows, the
on.needsproperty should allow specification of additional custom workflow jobs that pre_activation and activation should depend on.When specifying this property, the
pre_activationandactivationjobs do gain the job in theirneedslists, but theon.needsproperty is also emitted into the workflow, which is invalid.repro-on-needs-bug.md
Expected Result
Actual Result