Epic 0: Firebase auth, Cloud Run deploy, CI/CD automation
Draft
DO
1d ago+0+0+0123456789-0-0-0123456789
Summary
- Firebase Terraform module with Identity Platform config — automates Google Sign-In provider setup and authorized domains (localhost for dev). Apple Sign-In requires manual Apple Developer credentials.
- Cloud Run Terraform module — service definition with scale-to-zero, IAM for public access, and
ignore_changeson image so CI can deploy new revisions without Terraform drift. deploy-apiCI job — builds Docker image, pushes to Artifact Registry, deploys to Cloud Run via Workload Identity Federation (main branch only).mobile-buildCI job — generates.envfrom GitHub secrets, runsexpo export --platform web, uploads build artifact.bootstrap-secrets.sh— reads Terraform outputs and populates GitHub Actions secrets viagh secret set. Supports--dry-runand--envflags.
Two-phase Firebase setup
- First
terraform apply: Creates Firebase project + Identity Platform. Firebase auto-creates an OAuth client for Google Sign-In. - Retrieve the auto-created OAuth client ID from GCP Console → APIs & Services → Credentials.
- Second
terraform applywithgoogle_sign_in_client_idvariable set to enable the Google provider.
Required GitHub Secrets (manual, not from Terraform)
| Secret | Source |
|---|---|
GCP_PROJECT_ID | Your GCP project ID |
GCP_WORKLOAD_IDENTITY_PROVIDER | WIF provider resource name |
GCP_SERVICE_ACCOUNT | CI/CD service account email |
Test plan
-
terraform validate— all 3 modules pass (firebase, cloud-run, dev environment) - CI YAML — valid syntax
-
terraform planagainst real GCP project -
./scripts/bootstrap-secrets.sh --dry-runafter Terraform apply - CI deploy-api job runs on merge to main
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
-
New Features
- Mobile app build and export to web enabled via CI/CD pipeline.
- Firebase authentication with Google Sign-In support now integrated.
- Automated Cloud Run deployment for API on main branch pushes.
-
Documentation
- Added infrastructure setup guide and GCP bootstrap runbook for developers.