From 8018ec14a2a9d16ce74e45f0d99f5a8f2d9c6cc8 Mon Sep 17 00:00:00 2001 From: Matti Nannt Date: Wed, 9 Apr 2025 17:38:17 +0900 Subject: [PATCH] chore: use remote turbocache for building formbricks (#5305) --- .github/actions/cache-build-web/action.yml | 12 +++++++++++- .github/workflows/build-web.yml | 4 +++- .github/workflows/docker-build-validation.yml | 4 ++++ .github/workflows/e2e.yml | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/actions/cache-build-web/action.yml b/.github/actions/cache-build-web/action.yml index 25d18f4245..f6e72d7f68 100644 --- a/.github/actions/cache-build-web/action.yml +++ b/.github/actions/cache-build-web/action.yml @@ -8,6 +8,14 @@ on: required: false default: "0" +inputs: + turbo_token: + description: "Turborepo token" + required: false + turbo_team: + description: "Turborepo team" + required: false + runs: using: "composite" steps: @@ -62,6 +70,8 @@ runs: - run: | pnpm build --filter=@formbricks/web... - if: steps.cache-build.outputs.cache-hit != 'true' shell: bash + env: + TURBO_TOKEN: ${{ inputs.turbo_token }} + TURBO_TEAM: ${{ inputs.turbo_team }} diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index d029e9443c..19235a3979 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -4,7 +4,7 @@ on: permissions: contents: read - + jobs: build: name: Build Formbricks-web @@ -25,3 +25,5 @@ jobs: id: cache-build-web with: e2e_testing_mode: "0" + turbo_token: ${{ secrets.TURBO_TOKEN }} + turbo_team: ${{ vars.TURBO_TEAM }} diff --git a/.github/workflows/docker-build-validation.yml b/.github/workflows/docker-build-validation.yml index 5deea03d81..9fcd4de85c 100644 --- a/.github/workflows/docker-build-validation.yml +++ b/.github/workflows/docker-build-validation.yml @@ -12,6 +12,10 @@ on: permissions: contents: read +env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + jobs: validate-docker-build: name: Validate Docker Build diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9b631798f3..524151f735 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -16,6 +16,8 @@ on: env: TELEMETRY_DISABLED: 1 + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} permissions: id-token: write