You’ve got secrets. API keys, tokens, database passwords. They live in Google Cloud, but your team ships through GitHub Actions. Every deploy, you’re stuck trying to pass secrets across clouds without spilling them. GCP Secret Manager GitHub integration is the bridge everyone needs, yet few get right.
Google Cloud Secret Manager is where sensitive data belongs—encrypted, versioned, and auditable. GitHub Actions is where automation thrives. Combine the two and you get a pipeline that builds fast, stays secure, and never leaks credentials into logs. The trick is teaching them to trust each other without making you juggle tokens manually.
When GitHub Actions needs to pull a secret, it authenticates to GCP using a short-lived identity. That identity is derived from GitHub’s OpenID Connect (OIDC) token, then mapped to a GCP Service Account using Workload Identity Federation. The result is a temporary credential with minimal scope. No static JSON keys sitting in your repo, no rotating expiration Chrome reminders.
Here’s the mental flow:
- GitHub issues an OIDC token when a workflow runs.
- GCP trusts that token, based on a configured identity pool.
- The GitHub workflow impersonates a service account allowed to read secrets.
- It fetches the needed secret values through the GCP Secret Manager API—just in time, just enough.
If something feels off, check IAM roles first. Most errors come from misaligned bindings between the identity pool and the intended service account. Also, rotate secrets even if you use federation. It’s like flossing; future you will be grateful but current you might grumble.
Featured snippet answer:
To connect GCP Secret Manager with GitHub, enable Workload Identity Federation, create an identity pool that trusts GitHub’s OIDC provider, then map a service account with secretmanager.secretAccessor permissions. Your GitHub Actions workflow can then request a token and read secrets without storing GCP keys locally.