[PR #98] feat: Add Cloud Run deployment workflow #98

Open
opened 2026-10-27 21:09:32 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/98
Author: @snomiao
Created: 10/30/2025
Status: 🔄 Open

Base: main ← Head: sno-cloudrun


📝 Commits (10+)

  • 483f7a9 feat: add Cloud Run deployment workflow and infrastructure
  • 9f023ff fix: convert test files from jest to bun:test
  • 852e89c fix(infra): use "$@" instead of $* in tf.sh for proper argument handling
  • 6356b20 fix(infra): update container_port to 80 to match deployment config
  • 89474a1 fix(infra): replace Team Dash references with comfy-pr for consistency
  • ac0a9a3 docs(infra): update CLAUDE.md examples to reference existing resources
  • 3630a4d fix: use mockImplementation for complex mock values
  • 387183e fix: cast mock collection methods to any for type flexibility
  • cbaf620 fix: replace remaining jest references with bun mock API
  • 19ecc9d fix: update frontend issue transfer test assertion

📊 Changes

46 files changed (+1557 additions, -986 deletions)

View changed files

➕ .github/workflows/bot.yml (+287 -0)
📝 .github/workflows/easylabel.yaml (+1 -1)
📝 .gitignore (+8 -0)
📝 CLAUDE.md (+2 -1)
📝 README.md (+3 -3)
📝 app/(dashboard)/cnrepos/page.tsx (+3 -0)
📝 app/(dashboard)/page.tsx (+1 -1)
📝 app/(dashboard)/repos/page.tsx (+1 -1)
➕ app/bot/page.tsx (+3 -0)
📝 app/tasks/gh-core-tag-notification/index.spec.ts (+105 -103)
📝 app/tasks/gh-design/page.tsx (+6 -10)
📝 app/tasks/gh-desktop-release-notification/index.spec.ts (+54 -47)
📝 app/tasks/gh-frontend-release-notification/index.spec.ts (+67 -44)
📝 app/tasks/gh-issue-transfer-comfyui-to-frontend/index.spec.ts (+43 -60)
📝 app/tasks/page.tsx (+8 -6)
📝 app/tasks/run-gh-tasks.ts (+1 -1)
📝 bot/.dockerignore (+0 -0)
📝 bot/Dockerfile (+19 -11)
📝 bot/README.md (+214 -95)
📝 bot/cloudbuild.yaml (+1 -1)

...and 26 more files

📄 Description

Summary

This PR sets up GitHub Actions deployment workflow for Cloud Run, based on the team-dash project reference.

Changes

  • ✅ Deploy.yml workflow: Automated deployment pipeline for Cloud Run

    • Build and test with Bun
    • Docker build and push to Artifact Registry
    • Deploy to Cloud Run with branch-specific configurations
    • Health checks before traffic routing
    • PR deployments with no production traffic
  • ✅ Infrastructure: Terraform configuration for Cloud Run

    • Service account setup
    • Artifact Registry repository
    • Cloud Run service configuration
    • Documented in infra/CLAUDE.md
  • ✅ Entry point: Updated entry.sh to start Next.js server on port 80

Deployment Features

  • Branch deployments: Main branch gets 1 min instance, PRs scale to zero
  • Traffic management: PRs get tagged URLs with no production traffic
  • Health checks: 3-minute timeout with retry logic
  • Auto-scaling: Min 0-1, Max 1 instance
  • PR comments: Automated deployment notifications with URLs and logs

Testing

  • ✅ YAML syntax validated
  • ✅ Terraform configuration ready
  • ⏳ Will be tested on merge to main

Next Steps

  1. Merge this PR to enable deployment workflow
  2. Verify GCP secrets are configured in GitHub Actions
  3. Monitor first deployment to main branch

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/98 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 10/30/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `sno-cloudrun` --- ### 📝 Commits (10+) - [`483f7a9`](https://github.com/Comfy-Org/Comfy-PR/commit/483f7a9ffbeb122920fab57d5c18db4dbc8fafa2) feat: add Cloud Run deployment workflow and infrastructure - [`9f023ff`](https://github.com/Comfy-Org/Comfy-PR/commit/9f023fff2a690a53d56141d96e6bd202011c9862) fix: convert test files from jest to bun:test - [`852e89c`](https://github.com/Comfy-Org/Comfy-PR/commit/852e89c1dd387367f20f63dd671afd8be16ea3fa) fix(infra): use "$@" instead of $* in tf.sh for proper argument handling - [`6356b20`](https://github.com/Comfy-Org/Comfy-PR/commit/6356b20a9e72bcdd5cf9486e6b28f20af71efaee) fix(infra): update container_port to 80 to match deployment config - [`89474a1`](https://github.com/Comfy-Org/Comfy-PR/commit/89474a1306ace3f68cd59ad49656d148f41468cf) fix(infra): replace Team Dash references with comfy-pr for consistency - [`ac0a9a3`](https://github.com/Comfy-Org/Comfy-PR/commit/ac0a9a38a23479427e93dae8922dc067620e6781) docs(infra): update CLAUDE.md examples to reference existing resources - [`3630a4d`](https://github.com/Comfy-Org/Comfy-PR/commit/3630a4dd27fd821fbd707a5083aee90b2bfd8da3) fix: use mockImplementation for complex mock values - [`387183e`](https://github.com/Comfy-Org/Comfy-PR/commit/387183e5244e3f01f0b6646ae6943350dd36ac07) fix: cast mock collection methods to any for type flexibility - [`cbaf620`](https://github.com/Comfy-Org/Comfy-PR/commit/cbaf6203a589c367f45545e4f270c0f84b61b915) fix: replace remaining jest references with bun mock API - [`19ecc9d`](https://github.com/Comfy-Org/Comfy-PR/commit/19ecc9d9e8818a6c22f5d107d34c1b6c12794fe5) fix: update frontend issue transfer test assertion ### 📊 Changes **46 files changed** (+1557 additions, -986 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/bot.yml` (+287 -0) 📝 `.github/workflows/easylabel.yaml` (+1 -1) 📝 `.gitignore` (+8 -0) 📝 `CLAUDE.md` (+2 -1) 📝 `README.md` (+3 -3) 📝 `app/(dashboard)/cnrepos/page.tsx` (+3 -0) 📝 `app/(dashboard)/page.tsx` (+1 -1) 📝 `app/(dashboard)/repos/page.tsx` (+1 -1) ➕ `app/bot/page.tsx` (+3 -0) 📝 `app/tasks/gh-core-tag-notification/index.spec.ts` (+105 -103) 📝 `app/tasks/gh-design/page.tsx` (+6 -10) 📝 `app/tasks/gh-desktop-release-notification/index.spec.ts` (+54 -47) 📝 `app/tasks/gh-frontend-release-notification/index.spec.ts` (+67 -44) 📝 `app/tasks/gh-issue-transfer-comfyui-to-frontend/index.spec.ts` (+43 -60) 📝 `app/tasks/page.tsx` (+8 -6) 📝 `app/tasks/run-gh-tasks.ts` (+1 -1) 📝 `bot/.dockerignore` (+0 -0) 📝 `bot/Dockerfile` (+19 -11) 📝 `bot/README.md` (+214 -95) 📝 `bot/cloudbuild.yaml` (+1 -1) _...and 26 more files_ </details> ### 📄 Description ## Summary This PR sets up GitHub Actions deployment workflow for Cloud Run, based on the team-dash project reference. ## Changes - ✅ **Deploy.yml workflow**: Automated deployment pipeline for Cloud Run - Build and test with Bun - Docker build and push to Artifact Registry - Deploy to Cloud Run with branch-specific configurations - Health checks before traffic routing - PR deployments with no production traffic - ✅ **Infrastructure**: Terraform configuration for Cloud Run - Service account setup - Artifact Registry repository - Cloud Run service configuration - Documented in `infra/CLAUDE.md` - ✅ **Entry point**: Updated `entry.sh` to start Next.js server on port 80 ## Deployment Features - **Branch deployments**: Main branch gets 1 min instance, PRs scale to zero - **Traffic management**: PRs get tagged URLs with no production traffic - **Health checks**: 3-minute timeout with retry logic - **Auto-scaling**: Min 0-1, Max 1 instance - **PR comments**: Automated deployment notifications with URLs and logs ## Testing - ✅ YAML syntax validated - ✅ Terraform configuration ready - ⏳ Will be tested on merge to main ## Next Steps 1. Merge this PR to enable deployment workflow 2. Verify GCP secrets are configured in GitHub Actions 3. Monitor first deployment to main branch 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#98
No description provided.