Treat gh aw as a first-class runtime with release setup-cli injection, dev source build, and firewall domains#31622
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
gh aw as runtime and emit setup-cli stepgh aw as a first-class runtime with auto setup-cli injection and firewall domains
| const DefaultGoVersion Version = "1.25" | ||
|
|
||
| // DefaultGhAWVersion is the default gh-aw CLI version used by runtime setup. | ||
| const DefaultGhAWVersion Version = "v0.72.1" |
There was a problem hiding this comment.
@copilot use the compiler version of released, otherwise use the build gh-aw version in dev mode. Look at how gh-aw is inserted currently.
There was a problem hiding this comment.
Updated in 6b03a99. The gh-aw runtime no longer uses a hardcoded default; it now resolves to the current compiler/build version so release builds use the released compiler version and dev builds use the current build version.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR makes gh aw a first-class runtime in the workflow compiler: it can be declared under runtimes, is auto-detected from run: steps, and contributes runtime-derived firewall domains. It also updates generated lock workflows to inject github/gh-aw/actions/setup-cli.
Changes:
- Added a new
gh-awruntime definition and runtime-step generation behavior (including default version resolution). - Implemented
gh aw(token-pair) command detection and added coverage via new/updated unit tests. - Extended typed frontmatter parsing/serialization and firewall runtime→ecosystem domain mapping for
gh-aw.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/runtime_step_generator.go | Computes default version for gh-aw at setup-step generation time. |
| pkg/workflow/runtime_setup_test.go | Adds detection test cases for gh aw usage. |
| pkg/workflow/runtime_gh_aw_test.go | New tests for frontmatter parsing/serialization, runtime detection, domains, and setup-step output for gh-aw. |
| pkg/workflow/runtime_detection.go | Adds special-case detection for gh aw token pair and default version helper. |
| pkg/workflow/runtime_definitions.go | Registers gh-aw as a known runtime mapped to github/gh-aw/actions/setup-cli. |
| pkg/workflow/frontmatter_types.go | Adds runtimes.gh-aw to the typed config model. |
| pkg/workflow/frontmatter_serialization.go | Ensures gh-aw is counted and serialized back to map form. |
| pkg/workflow/frontmatter_parsing.go | Adds parsing support for runtimes: { gh-aw: ... }. |
| pkg/workflow/domains.go | Maps gh-aw runtime to a new gh-aw ecosystem for domain expansion. |
| pkg/workflow/data/ecosystem_domains.json | Adds a gh-aw ecosystem domain list. |
| .github/workflows/static-analysis-report.lock.yml | Updates locked workflow to include setup-cli injection and manifest entry. |
| .github/workflows/copilot-token-optimizer.lock.yml | Updates locked workflow to include setup-cli injection and manifest entry. |
| .github/workflows/copilot-token-audit.lock.yml | Updates locked workflow to include setup-cli injection and manifest entry. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 13/13 changed files
- Comments generated: 4
| ID: "gh-aw", | ||
| Name: "gh-aw CLI", | ||
| ActionRepo: "github/gh-aw/actions/setup-cli", | ||
| ActionVersion: "main", | ||
| VersionField: "version", | ||
| // Default version is computed at generation time from the current gh-aw build. | ||
| DefaultVersion: "", | ||
| Commands: []string{"gh-aw"}, |
| - name: Setup gh-aw CLI | ||
| uses: github/gh-aw/actions/setup-cli@main | ||
| with: | ||
| version: 'v0.72.1' |
| - name: Setup gh-aw CLI | ||
| uses: github/gh-aw/actions/setup-cli@main | ||
| with: | ||
| version: 'v0.72.1' |
| - name: Setup gh-aw CLI | ||
| uses: github/gh-aw/actions/setup-cli@main | ||
| with: | ||
| version: 'v0.72.1' |
|
@copilot review all comments |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed the actionable review feedback in
|
|
@copilot in dev mode, the compiler should inject the code to build gh-aw from sources like in other jobs. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed in |
gh aw as a first-class runtime with auto setup-cli injection and firewall domainsgh aw as a first-class runtime with release setup-cli injection, dev source build, and firewall domains
|
@copilot recompile |
Introduces
gh awas a first-class runtime in workflow compilation, including runtime detection, runtime setup step generation, and runtime-derived firewall domains.What changed
gh-awruntime support underruntimes, including typed frontmatter parsing/serialization.gh awcommand-pair detection fromrun:steps.github/gh-aw/actions/setup-cliwith versioned setup.gh extension install .) to match existing dev workflows.@mainusage and updated affected lock workflow action references to pinned/immutable refs.Validation