How to Deploy Only Changed Nx Monorepo Services to Cloud Run Without Stored Keys
A developer workflow guide explains how to use Nx's 'affected' command to deploy only the services modified in a given merge, avoiding unnecessary or redundant deployments across a Python and Node monorepo. The approach places each app's deploy command directly in its own project configuration, ensuring CI and local developers run identical commands with no configuration drift. Authentication is handled via GitHub Actions' built-in OIDC tokens and Google Cloud's Workload Identity Federation, eliminating the need for long-lived service account keys stored in repository secrets. Google's Workload Identity Pool validates each token against a specific repository, rejecting any requests from unrecognized sources before issuing short-lived credentials scoped to Cloud Run deployment. The guide also flags a breaking change from March 2025, where Google Container Registry stopped accepting new writes, advising new projects to push directly to Artifact Registry instead.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in