ci: build and push production image via GitHub Actions#349
Merged
Conversation
Cloud Build cannot unpack the dhi-mirror (Docker Hardened Image) base layers and fails with "archive/tar: invalid tar header". Build the image in GitHub Actions instead, using BuildKit via getsentry/action-build-and-push-images (the same path vroom/snuba took). The action tags with the full github.sha, matching what GoCD deploys by (GO_REVISION_RELOAD_REPO), and pushes to both the single-region registry GoCD currently deploys from and the multi-region mirror. This lands while Cloud Build is still authoritative so the new build can be verified in parallel; the GoCD gate is switched over in a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
f5751ea to
041dadc
Compare
joshuarli
approved these changes
Jun 15, 2026
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.
Build the reload production image in GitHub Actions instead of Cloud Build.
Cloud Build cannot unpack the
dhi-mirror(Docker Hardened Image) base layers and fails witharchive/tar: invalid tar header. This builds the image with BuildKit viagetsentry/action-build-and-push-images— the same path vroom/snuba/release-registry already took.The action tags with the full
github.sha, which is exactly what GoCD deploys by (GO_REVISION_RELOAD_REPO), and pushes to both registries:us-central1-docker.pkg.dev/sentryio/reload/image(single-region, what GoCD deploys from today)us-docker.pkg.dev/sentryio/reload-mr/image(multi-region mirror)Auth uses the
gha-gcr-pushservice account via Workload Identity Federation, authorized in getsentry/security-as-code#3128 (merged + applied).This intentionally lands while Cloud Build is still authoritative so the new build can be verified in parallel — GoCD still gates on the Cloud Build check until the follow-up PR switches it over. After merge, confirm the workflow pushes
…/reload/image:<sha>and…/reload-mr/image:<sha>before merging the GoCD gate flip.