Repository navigation
feat(ci): publish main Bicep types to GHCR - #13119
willdavsmith wants to merge 2 commits into
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved critical validation/configuration issues and moderate workflow/test gaps remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds a disabled-by-default protected-main workflow to publish Radius Bicep types to GHCR and mirror them to ACR.
Changes:
- Adds serialized capture, validation, publication, and retry handling.
- Adds provenance, receipts, routing safeguards, tests, and documentation.
| File | Summary |
|---|---|
docs/contributing/contributing-code/contributing-code-github-workflows/README.md |
Documents activation and verification. Nit (1 vote): install pinned yq in the local verification sequence. |
.github/workflows/unit-tests.yaml |
Runs focused Python and Node.js tests. |
.github/workflows/build-main.yaml |
Selects one publisher and validates summary results. |
.github/workflows/__publish-bicep-types.yaml |
Captures and publishes validated bundles. Moderate (1 vote): wait for the registry service to become ready. |
.github/scripts/bicep-types.py |
Validates, stamps, copies, and records publication data. Critical (2 votes): the generated Bicep configuration is not selected. Critical (1 vote): references in decoded type documents are not fully validated. |
.github/scripts/bicep-types-workflows.test.mjs |
Tests workflow routing and safeguards. |
.github/scripts/bicep-types_test.py |
Tests publisher contracts, retries, and failure cases. |
.github/scripts/bicep-types_local_test.py |
Verifies local OCI packaging and compilation. Moderate (1 vote): the alias-specific test uses a digest instead of tag references. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| for child in value: | ||
| check_refs(child) | ||
|
|
||
| check_refs(index) |
| command( | ||
| "bicep", | ||
| "publish-extension", | ||
| str(Path(index_file).resolve()), |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## willdavsmith-cloud-publishing-isolation #13119 +/- ##
========================================================================
Coverage 69.27% 69.27%
========================================================================
Files 735 735
Lines 40385 40385
========================================================================
Hits 27976 27976
Misses 12409 12409 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
46b57e8 to
5308244
Compare
5308244 to
def54f2
Compare
def54f2 to
2f8b064
Compare
2f8b064 to
b6ae383
Compare
b6ae383 to
75d0415
Compare
Generate reusable native OCI snapshots and publish Radius edge with an exact-digest ACR compatibility mirror on the release foundation. Preserve upstream snapshot jobs, edge-only publication, release tag policy and shared release environment behavior. Pass only the three named Azure identifiers and retain first-upload visibility validation and receipts. Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
75d0415 to
673005d
Compare
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |

Summary
Merging is the main Bicep publishing cutover. Protected Radius main builds publish
ghcr.io/radius-project/bicep-types-radius:edgeand mirror the same manifest digest tobiceptypes.azurecr.io/radius:latest, with no external-main fallback.This six-file layer preserves the current snapshot job graph, edge-only main CLI/image publication, external-image alias policy, release attestation gates, current-main checks, Helm gate, and native main queue. It replaces only the main Bicep caller and adds its publication-status check. Release workflows, tag policy, shared
publish-bicepenvironment behavior, consumers, and GHCR stablelatestremain unchanged. The existing Radius/AWS immutable ACR staging jobs andpromote-bicep-types.mjsfinalizer remain intact for the later release-contract layer.Reason for change
Related to #12937. Read-only generation captures a native OCI snapshot once. A fresh trusted uploader validates source/run/artifact identity, digests, and the Bicep provider contract before native ORAS copies; downloaded code is never executed. The caller forwards only the three required Azure identifiers, and the generation job does not consume them.
Canonical protected main pushes and manual main runs may publish. Successful change detection permits intentional skips; failed/missing classification, unexpected skips, and publication failures fail the summary. Existing release-metadata filtering and cloud skip-report requirements are preserved. Current-main retries reuse the snapshot. Stale first attempts skip before mutation; superseded retries fail closed because previous writes may be partial. Started pairs finish or fail visibly with receipt evidence.
Dependencies and landing
Depends on #13134 -> #13133. The upstream release foundation is merged into main, and this PR is based on the synchronized cloud-isolation branch. The existing downstream stack targets main; land its remaining layers in order. No upstream retarget or replacement release pipeline is required.
Setup before cutover
GITHUB_TOKENto create the canonical package; the trusted uploader requestspackages: write. No PAT or separate publisher repository is needed.BICEPTYPES_CLIENT_ID,BICEPTYPES_TENANT_ID, andBICEPTYPES_SUBSCRIPTION_IDare explicitly passed to required callee inputs, without broad secret inheritance. The trusted uploader uses the sharedazure-oidc-login.mjsretry helper with those same identifiers and clears its Azure session afterward. Verify ACR authorization and establish federation scoped to the new main reusable workflow; helper reuse does not establish that trust. Preserve legacy issuer bindings, release tag policy, and shared environment approval behavior; no new protected-release-tag prerequisite is introduced.publish-bicep-types.ymlreceiver jobs, and prevent renewed production development writes from main/edge tobiceptypes.azurecr.io/radius:latest, including requests whose omitted target defaults toradius. Keep the legacy tagged Radius release writer until all old unpublished releases finish and the release-contract handoff (R3) is complete; preserve explicittest/radiuspublishing and existing ACR reads. Do not disable the entire receiver or assume an AWS-only guard covers this Radius path. Private publisher edits/setup require separate approval and have not been performed.External identity and package setup is not performed by this PR. Full-version/RC publication and AWS/release coordination remain outside this main-only change.
First upload and public access
The first GHCR push can create the package, normally as private. Upload, mirroring, and digest verification happen before the public-visibility check. Private/internal visibility or an API failure fails distribution validation while preserving an
uploadedreceipt with both verified digests.A package admin must use Packages -> bicep-types-radius -> Package settings -> Change visibility -> Public, then rerun and verify anonymous restore before switching consumers. Visibility is never changed automatically. Superseded runs with no writes do not query the package.
How to test
Use the repository's Node.js version, Bash, Git, jq, yq, and OpenSSL. From the repository root, run:
node --test .github/scripts/bicep-types.test.mjs .github/scripts/cloud-test-artifacts.test.mjs .github/scripts/changes_test.mjs TMPDIR="$(node -p 'require("node:fs").realpathSync(require("node:os").tmpdir())')" node --test .github/scripts/azure-oidc-login_test.mjs bash .github/scripts/build-summary_test.sh bash .github/scripts/release-cutover_test.shThese pass 334 publisher/cloud/change-detector Node cases, 44 OIDC helper cases, 10 summary tests, and 15 release-cutover tests, respectively. The canonical
TMPDIRavoids the inherited OIDC fixture's/varversus/private/varentry-point comparison on macOS.Expected behavior includes fail-closed source/bootstrap checks, the trusted Deployment Engine default
edgetag with explicit dispatch tags preserved, retained cloud producer-attempt tags, and successful classification plus successful skip reporting before a filtered run is accepted. All 18 Functional Test Run status cases execute the real summary JavaScript. The parent's release-metadata filtering, external-imageedge/latestpolicy, release attestation gates, Helm fixes, Bash helper invocations, and tool/action pins are retained unchanged. The Radius Bicep development mirror deliberately remains GHCRedgeto ACRlatest; it is not an external-image stable-alias promotion.Run the scoped workflow and formatting checks:
All four commands pass. Actionlint 1.7.12 does not recognize native
concurrency.queue; the unit workflow also has an unchanged Windows PowerShell SC2086 diagnostic. Both occur on the unmodified parent, so the first command excludes only that queue diagnostic and the second checks workflow schema/expressions without ShellCheck. Exact markdownlint-cli2 0.24.0 and Prettier 3.9.10 pass without changing manifests or lint configuration.The unchanged publisher runtime previously passed local native OCI tar import, exact registry copies, identical retry digests, anonymous restore/compile, and corrupt-blob rejection. This synchronization is source-level validation, not proof of live Azure authentication or production publication. No production registry, identity, visibility, or settings operations were performed.
File change summary
.github/scripts/bicep-types.mjs.github/scripts/bicep-types.test.mjs.github/workflows/__publish-bicep-types.yaml.github/workflows/build-main.yaml.github/workflows/unit-tests.yamldocs/contributing/contributing-code/contributing-code-github-workflows/README.md