ci: build to GHCR and deploy to do-prod#11
Merged
Merged
Conversation
Post AWS->DO migration, main builds and pushes the image to ghcr.io/openmeet-team/survey using the job's built-in GITHUB_TOKEN (no ECR / AWS credentials), and the gitops step pins it into the do-prod overlay instead of the retired dev environment. - build-and-deploy: log in to ghcr.io, build + push :<sha> and :latest, request packages: write. - update-image-gitops (reusable): set the do-prod images[].newTag for the service, matched on newName so multi-entry services update in one shot, with a guard that fails the run if no entry matches. Targets do-prod.
The `test` job installed `templ@latest`; the CLI has drifted ahead of the pinned runtime (github.com/a-h/templ v0.3.960), so `templ generate` emitted code referencing symbols the runtime lacks (templ.ResolveAttributeValue), failing the build. Pin the CLI to v0.3.960 to match go.mod (regeneration produces zero diff; `go build ./...` passes). Unblocks CI.
tompscanlan
added a commit
that referenced
this pull request
Jul 17, 2026
The builder stage ran `go install .../templ@latest`. `@latest` now resolves to v0.3.1020, which requires Go >= 1.25, but the builder is golang:1.24-alpine (GOTOOLCHAIN=local) — so the prod image build fails at `templ generate`. Pin the CLI to v0.3.960 to match go.mod's runtime (requires Go 1.23; builds on the 1.24 builder). Regeneration produces zero diff and `go build ./...` passes. The CI test job was already pinned in #11; this aligns the Dockerfile.
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.
What
Retargets CI from ECR → EKS-dev to GHCR → do-prod (the only live cluster after the AWS→DO migration), mirroring the
openmeet-apirewire:ghcr.ioand builds + pushesghcr.io/openmeet-team/survey:<sha>(+:latest) with the job's built-inGITHUB_TOKEN(permissions: packages: write). Preserves the plaindocker build(no build args). The do-prod overlay's twosurveyimages[]entries share onenewName, so both update in a single yq pass.images[].newTagviayq 'select(.newName == …)'— with a guard that fails the run if no entry matches (no silent no-op deploys). Targetsenvironment: do-prod.PR test jobs are unchanged and still run on PRs; only the push-to-
mainbuild/deploy path changed.Depends on
The infra refactor that makes the do-prod
images:transformer the single source of truth (openmeet-infrastructure#11, merged). No further infra change is needed — the do-prod overlay already maps this service toghcr.io/openmeet-team/survey, so the tag bump rolls the Deployment (and its CronJobs) in one shot.Requires before merge
The
surveyGHCR package must grant this repo Actions: Write (Package settings → Manage Actions access) or theGITHUB_TOKENpush will 403. Swapping to a PAT is a 2-line change (noted inline in the workflow).On merge
Builds a fresh image and deploys it to do-prod via ArgoCD auto-sync. This commit only changes workflow files, so the resulting image is behavior-identical to what's live today — a low-risk first exercise of the full pipeline.
Watch:
kubectl -n prod rollout status deployment/survey