Skip to content

CD: local just deploy-dev for Azure dev; main → prod - #67

Merged
NinjaLikesCheez merged 2 commits into
mainfrom
cursor/ghcr-azure-cd-effc
Oct 8, 2026
Merged

NinjaLikesCheez merged 2 commits into
mainfrom
cursor/ghcr-azure-cd-effc

Conversation

@NinjaLikesCheez

@NinjaLikesCheez NinjaLikesCheez commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes nothing yet (#10 stays open: Sentry releases and just register from CD are still later).

Temporary routing (overrides issue 10 / architecture main → dev):

  • dev: just deploy-dev on a laptop. Builds this tree, pushes ghcr.io/pixelbar/pixel:<sha> (or dev-dirty-* if dirty) plus :dev, then az containerapp update on pixel-dev only. Max replicas stay 1. CI does not deploy pull requests, so a local SHA is not overwritten by another CI head.
  • prod: merges to main push that SHA (and moving main) and deploy it. Fail closed if infra/envs/prod (Prod environment, approval gate and go-live in the Pixelbar server #12) or prod Key Vault secrets are missing. Discord will not answer on prod until that stack exists.

Do not copy the Mini local / Pixel Dev Discord token (pixel-dev-kv) into prod. Neither path applies Terraform or starts Pixel locally. If pixel-dev is up, do not also just dev on the same token.

GHCR auth

  • Local dev: just docker-login-ghcr uses gh auth token. Needs gh auth refresh --scopes write:packages,read:packages,repo.
  • CI main: publish job only, packages: write, docker/login-action + GITHUB_TOKEN. Provenance/SBOM off.

The image is secret-free. The package should be public so Container Apps can pull (today’s 401 / DENIED). The workflow tries to flip this and warns if it cannot.

What Thomas must set

  1. GHCR package pixelbar/pixel: Package settings → Change visibility → Public. Local push also needs write:packages on gh.
  2. az signed in on the Pixel subscription for just deploy-dev. Environment dev ARM_* is not required for this path.
  3. GitHub Environment prod (missing): create it, require reviewers, limit to branch main. Variables (not secrets): ARM_CLIENT_ID=7cb1d0a8-5314-4c9b-a0ba-10f5c75367d7, ARM_TENANT_ID=2cd2bab0-0dd0-41ff-8f13-592500857ea6, ARM_SUBSCRIPTION_ID=d150e252-e2f0-47fb-8a4a-c3f29e9aebd4.
  4. pixel-dev Container App still has to exist (Terraform module for Pixel on Azure Container Apps + dev environment #9 / PR 66). just deploy-dev only runs az containerapp update.

Prod stays fail-closed

infra/envs/prod is not in this PR. A push to main publishes the image, then the prod job fails and does not deploy. No Mini/dev token, no second replica.

See ADR 0010.

Open in Web Open in Cursor 

Temporary routing for #10: pull requests push a SHA (and pr-<n>) to GHCR
and roll that image onto pixel-dev. Merges to main push the SHA (and the
moving main tag) toward prod, fail-closed until infra/envs/prod and prod
secrets exist. Never copy the Mini/dev Discord token. Max replicas stay 1.
just deploy-dev builds this tree, pushes GHCR, and updates pixel-dev.
CD on main still publishes the SHA and deploys prod (fail closed until #12).
CI no longer rolls PRs onto the one-replica dev app.
@cursor cursor Bot changed the title CD: GHCR publish; PRs → Azure dev, main → prod (temporary) CD: local just deploy-dev for Azure dev; main → prod Oct 8, 2026
@NinjaLikesCheez
NinjaLikesCheez marked this pull request as ready for review October 8, 2026 12:41
@NinjaLikesCheez
NinjaLikesCheez merged commit 8c7a173 into main Oct 8, 2026
3 checks passed
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