ci(cdn): add workflow_dispatch trigger and PR dry-run for registry upload#20
Merged
Conversation
…load Two pieces of validation tooling for the CDN publish pipeline: 1. workflow_dispatch on npm-publish.yml so the publish-cdn-registry job can be fired manually for ad-hoc validation. The registry has no versioned path so no extra version resolution is needed; on dispatch the registry is rebuilt from packages/registry/dist/r/ and synced to s3://$BUCKET/ui/r/ with /ui/r/* invalidated. 2. New cdn-dryrun.yml workflow that runs on PRs touching the ui package, the registry package, or either of the publish workflows. Authenticates via OIDC to the read-only github-actions-cdn-reader role, lists what is currently at s3://$BUCKET/ui/r/, and performs aws s3 sync --dryrun against the registry path. No writes. Catches broken builds, missing registry items, role mis-assumptions, and bucket-path drift before they hit a release. Both wired against the existing org-level secrets: CDN_AWS_ROLE_DEPLOYER (writes), CDN_AWS_ROLE_READER (reads), CDN_AWS_REGION, CDN_S3_BUCKET, CDN_CLOUDFRONT_DISTRIBUTION_ID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two pieces of validation tooling for the CDN publish pipeline added in #19:
workflow_dispatchonnpm-publish.ymlsopublish-cdn-registrycan be fired manually for ad-hoc validation without waiting for a release.cdn-dryrun.ymlworkflow that runs on PRs touching ui/registry/publish workflows. Uses the read-onlyCDN_AWS_ROLE_READERto list bucket state andaws s3 sync --dryrunagainst/ui/r/. No writes.Why
Validating the CDN pipeline shouldn't require cutting a real release. After this lands:
npm Publishmanually from the Actions UI (orgh workflow run npm-publish.yml --repo deepgram/ui). It rebuilds the registry, re-uploads to/ui/r/, and invalidates/ui/r/*.Dispatch behaviour
On `workflow_dispatch`:
Dry-run behaviour
PRs that touch `packages/ui/`, `packages/registry/`, `.github/workflows/cdn-dryrun.yml`, or `.github/workflows/npm-publish.yml` get a `dryrun-registry` job that:
No `--delete` on the dryrun (the live job keeps it). No CloudFront invalidation either.
Risk
Both changes are additive. Existing release flow is untouched aside from the new `if:` that adds the dispatch path.
Follow-up
Matching change for the agent widget upload in deepgram/agent#45.