Repository navigation
bot: merging is deploying - #45
Merged
Merged
Conversation
The hosted app drifted behind main three times in one afternoon because a deploy was something I had to remember. A push to main touching bot/, src/ or the manifests now builds the image and rolls out a revision, and fails the job if that revision cannot answer /health — a bot that cannot answer is a bot that is not reviewing anything. Keyless: GitHub mints an OIDC token, Workload Identity Federation trades it for a short-lived credential, and the pool is bound to this repository. No service-account key exists to leak, and release_layout asserts none is ever added. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The hosted app drifted behind
mainthree times this afternoon, because deploying was something I had to remember to do. Now a push tomainthat touchesbot/,src/or the manifests builds the image with Cloud Build and rolls out a Cloud Run revision.It verifies the rollout. After
gcloud run deploythe job polls/healthand fails if the new revision never answers — a revision that cannot answer is a revision that is not reviewing anyone's pull requests, and a silent failure there is exactly the kind you find out about from a user.Keyless authentication. GitHub mints an OIDC token; Workload Identity Federation exchanges it for a short-lived credential. There is no service-account key in a GitHub secret to leak or rotate. The pool's attribute condition binds it to
Na5co/polygo, and the deployer service account holds only what it needs:run.admin,cloudbuild.builds.editor,artifactregistry.writer,iam.serviceAccountUser,storage.objectAdmin.tests/release_layout.rsasserts the workflow keeps using WIF, never gains acredentials_json, and keeps the health check.bot/README.mddocuments both this and the manual path for a rollback.Everything on the Google side already exists (pool, provider, service account, bindings), so this works the moment it merges —
workflow_dispatchis there to prove it without waiting for a code change.🤖 Generated with Claude Code