ci: add optional Cloud Run deploy job (gated on repo vars)#43
Closed
ci: add optional Cloud Run deploy job (gated on repo vars)#43
Conversation
The deploy job is skipped unless GCP_PROJECT_ID is set as a repository variable, so it is a no-op for the public repo and forks. A downstream mirror that sets the required variables (GCP_PROJECT_ID, GCP_WIF_PROVIDER, CLOUD_RUN_SERVICE, CLOUD_RUN_REGION, BASE_URI, CLOUD_RUN_VPC_CONNECTOR, CLOUD_RUN_SERVICE_ACCOUNT) gets automatic deploys on push to main without carrying a workflow diff. Sets --memory=1Gi since the default 512Mi was running at 95-98% utilization under typical load.
Contributor
Author
|
Keeping deploy config in the downstream fork instead — closing. |
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
Adds a
deployjob that ships to Cloud Run on push tomain, gated onvars.GCP_PROJECT_IDso it's a no-op here and in forks. A downstream mirror can enable it by setting repo variables — no workflow diff to carry across rebases.Includes
--memory=1Gi(the 512Mi default sat at ~97% under load and caused multi-second GC stalls).Required repo variables (in the deploying mirror only)
GCP_PROJECT_IDmcp-server-everythingGCP_WIF_PROVIDERprojects/NNN/locations/global/workloadIdentityPools/github-actions-pool/providers/github-providerCLOUD_RUN_SERVICEmcp-server-everythingCLOUD_RUN_REGIONus-central1BASE_URIhttps://example-server.modelcontextprotocol.io/CLOUD_RUN_VPC_CONNECTORredis-connectorCLOUD_RUN_SERVICE_ACCOUNTcloudrun-service@PROJECT.iam.gserviceaccount.comAlso requires a
REDIS_URLsecret in GCP Secret Manager and a WIF provider configured to trust the deploying repo.Test plan
deployjob is skipped (condition false)