Skip to content

feat(release): promote sealed stage from Actions with repo R2 secret - #30

Merged
AlexMikhalev merged 1 commit into
mainfrom
fix/v1.21.16-promote-workflow
Sep 25, 2026
Merged

AlexMikhalev merged 1 commit into
mainfrom
fix/v1.21.16-promote-workflow

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Adds a workflow_dispatch wrapper (.github/workflows/promote-release.yml) that downloads a sealed client-release-stage artifact by run id inside Actions and runs the unchanged scripts/promote-release.sh there, with CLOUDFLARE_API_TOKEN from the repo secret so the R2 credential never leaves GitHub.

Inputs: version, staged_run_id, expected_source_sha, correlation_id. The script re-validates provenance (version/SHA/correlation vs provenance.json) before any remote write; the immutable-asset preflight makes re-runs idempotent (the already-published 21 GitHub assets will be compared and skipped byte-for-byte, then the R2 object puts, rollback-pointer snapshot, and stable.json/stable-v2.json advances run).

Permissions are minimal: actions:read (artifact fetch by run id) and contents:write (only exercised if a release asset is missing and must be re-uploaded). Wrangler pinned at 4.140.0.

Immediate use: finish the v1.21.16 promotion (stage from seal run 36181486363, cf23b9b, correlation release-v1.21.16-clients-cf23b9b).

Refs #337

The operator promotion (scripts/promote-release.sh) needs the R2 write
credential, which lives only as the repo secret CLOUDFLARE_API_TOKEN. Add a
workflow_dispatch wrapper that downloads the sealed stage artifact by run
id inside Actions and runs the same script there, so the credential never
leaves GitHub. The script re-validates provenance against the sealed stage
before any remote write; its immutable-asset preflight keeps re-runs
idempotent (identical bytes skipped, differing bytes abort).

Refs #337
@AlexMikhalev
AlexMikhalev merged commit 5a014bb into main Sep 25, 2026
2 checks passed
@AlexMikhalev
AlexMikhalev deleted the fix/v1.21.16-promote-workflow branch September 25, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant