Skip to content

jobs: runs-on does not accept group: object form — schema validator rejects it while top-level runs-on accepts it fine #34006

Description

@lindeberg

Summary

Using the group: object form of runs-on inside a custom jobs: block fails at schema validation, even though the exact same syntax compiles correctly at the top-level runs-on field.

Reproduction

---
on:
  workflow_dispatch:

engine:
  id: copilot
  model: claude-sonnet-4.6

runs-on:
  group: "arc-custom"   # ✅ works fine at top level

jobs:
  my-prefetch:
    runs-on:
      group: "arc-custom"   # ❌ fails at schema validation
    steps:
      - run: echo "hello"

safe-outputs:
  noop:
---

Error

error: Unknown property: group. 'group' belongs under 'concurrency', 'safe-outputs/create-issue' or 'runs-on'

What works vs what doesn't

Form Top-level runs-on jobs: runs-on
String: ubuntu-latest ✅ ✅
Array: [self-hosted, linux] ✅ ✅ (fixed by #19407)
Object: {group: arc-custom} ✅ ❌ schema error

Runtime behaviour (manually patched lock file)

We confirmed that manually editing the compiled lock file to use runs-on: {group: arc-custom} on a jobs: entry works correctly at runtime — GitHub Actions picks up the runner group and the job executes. The block is compiler-safe; only the schema validator rejects it.

Expected behaviour

All runs-on forms supported at the top level should be equally supported inside jobs:. The group: object form is the standard GitHub Actions syntax for targeting a runner group.

Context

PR #19407 fixed buildCustomJobs() in the compiler to correctly emit array and object runs-on forms (rather than silently dropping them). However, the schema validator for the jobs: frontmatter block was not updated — it still rejects the group: key. The compiler fix and the schema definition are in separate code paths.

Version

gh-aw v0.75.0 (latest)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions