From eedf5668c0053d628f66b957e9e046fce2c63785 Mon Sep 17 00:00:00 2001 From: JOY Date: Sun, 13 Sep 2026 02:43:44 +0000 Subject: [PATCH 1/2] ci(api-v2): add workflow to build and publish the Platform API v2 image The web image rewrites /api/v2/* to the calcom-api service, but that service was never deployed, so every Platform API v2 call against cal.crove.com failed. Publishes ghcr.io/dos/crove-cal-api from apps/api/v2/Dockerfile. Build args for prisma generate are format-valid placeholders rather than production credentials, because generate only parses the schema and real build args would be baked into image layers. --- .github/workflows/deploy-api-v2-docker.yml | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/deploy-api-v2-docker.yml diff --git a/.github/workflows/deploy-api-v2-docker.yml b/.github/workflows/deploy-api-v2-docker.yml new file mode 100644 index 00000000000..effbc61280f --- /dev/null +++ b/.github/workflows/deploy-api-v2-docker.yml @@ -0,0 +1,53 @@ +name: Build and Push Crove Cal API v2 Image + +on: + push: + branches: + - dev + - main + paths: + - "apps/api/v2/**" + - "packages/**" + - ".github/workflows/deploy-api-v2-docker.yml" + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push API v2 image + uses: docker/build-push-action@v6 + with: + context: . + file: ./apps/api/v2/Dockerfile + push: true + tags: | + ghcr.io/dos/crove-cal-api:latest + ghcr.io/dos/crove-cal-api:${{ github.sha }} + cache-from: type=gha,scope=api-v2 + # Why: mode=min so the build stage (which carries DATABASE_URL in its ENV) + # is never exported into the shared Actions cache. + cache-to: type=gha,mode=min,scope=api-v2 + build-args: | + # prisma generate only parses the schema, it never connects, so these are + # format-valid placeholders. Real values come from the runtime environment. + # Passing production credentials here would bake them into image layers. + DATABASE_URL=postgresql://build:build@localhost:5432/build + DATABASE_DIRECT_URL=postgresql://build:build@localhost:5432/build From 6752eeb2674be17b842f00edb11109040d529fb4 Mon Sep 17 00:00:00 2001 From: JOY Date: Sun, 13 Sep 2026 08:34:46 +0000 Subject: [PATCH 2/2] fix(api-v2): stop emitting declarations so the Prisma generated types compile nest build failed with six TS4094 errors inside packages/prisma/generated/prisma/internal/prismaNamespace.ts because declaration emit cannot represent the #private marker Prisma generates. apps/api/v2 is an application whose entrypoint is dist/apps/api/v2/src/main.js, and nothing in the repo imports @calcom/api-v2, so the emitted .d.ts files were never consumed. --- apps/api/v2/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/v2/tsconfig.json b/apps/api/v2/tsconfig.json index 59cf716bec9..9d42a373fdc 100644 --- a/apps/api/v2/tsconfig.json +++ b/apps/api/v2/tsconfig.json @@ -3,7 +3,7 @@ "ignoreDeprecations": "6.0", "module": "commonjs", "esModuleInterop": true, - "declaration": true, + "declaration": false, "resolveJsonModule": true, "removeComments": true, "emitDecoratorMetadata": true,