Skip to content

feat: setup CI/CD for Google Cloud Run with WIF#288

Merged
Jeffrey0522 merged 2 commits into
SkillCert:mainfrom
kimcascante:feat/cicd-setup-gcp
Feb 28, 2026
Merged

feat: setup CI/CD for Google Cloud Run with WIF#288
Jeffrey0522 merged 2 commits into
SkillCert:mainfrom
kimcascante:feat/cicd-setup-gcp

Conversation

@kimcascante
Copy link
Copy Markdown
Contributor

🚀 Pull Request

🔗 Close #276

📋 Description

This PR implements the CI/CD pipeline for Google Cloud Run using GitHub Actions and Workload Identity Federation (WIF). It includes the necessary Docker configuration and deployment workflows to automate the build and release process.

Changes

  • Dockerfile: Added a multi-stage Dockerfile optimized for Next.js 15, including support for pnpm and build-time environment variables.
  • Workflow: Created .github/workflows/deploy.yml which handles authentication with GCP using WIF, builds the image, pushes it to Artifact Registry, and deploys to Cloud Run.
  • Next Config: Enabled output: 'standalone' in next.config.ts to reduce container image size and improve performance.

Technical Details

  • Security: Uses Workload Identity Federation (WIF) instead of static JSON service account keys.
  • Efficiency: Multi-stage Docker build ensures the final image only contains production dependencies and the standalone server.
  • Scalability: Automated deployment ensures that every merge to main is reflected in the Cloud Run service.

Setup Requirements (Cloud Side)

  1. Ensure the Artifact Registry repository skillcert exists in us-central1.
  2. Configure WIF in GCP to allow this repository to impersonate the GitHub Actions service account.
  3. Add the following secrets to GitHub:
    • GCP_PROJECT_ID
    • GCP_WIF_PROVIDER
    • GCP_WIF_SERVICE_ACCOUNT

🙏 Thank you for your work!

@Jeffrey0522
Copy link
Copy Markdown
Contributor

@kimcascante Please resolve conflicts

@kimcascante
Copy link
Copy Markdown
Contributor Author

@Jeffrey0522 done

@Jeffrey0522 Jeffrey0522 merged commit b3c8491 into SkillCert:main Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup CI/CD for Google Cloud Run Deployments

2 participants