From a2beb3ca4c2b00b9a4b3766298ac3a646494e82e Mon Sep 17 00:00:00 2001 From: amaralc Date: Sun, 15 Feb 2026 12:20:21 -0300 Subject: [PATCH 1/3] fix(ci): add id-token write --- .github/workflows/teams-kernel-workflows-deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/teams-kernel-workflows-deploy.yml b/.github/workflows/teams-kernel-workflows-deploy.yml index d69dea28..0c10a032 100644 --- a/.github/workflows/teams-kernel-workflows-deploy.yml +++ b/.github/workflows/teams-kernel-workflows-deploy.yml @@ -77,6 +77,7 @@ jobs: name: Deploy Kernel Team permissions: contents: read + id-token: write needs: build uses: ./.github/workflows/teams-kernel-workflows-deploy-team.yml secrets: @@ -105,6 +106,7 @@ jobs: name: Deploy People Team permissions: contents: read + id-token: write needs: deploy-kernel if: needs.deploy-kernel.result == 'success' uses: ./.github/workflows/teams-kernel-workflows-deploy-team.yml @@ -135,6 +137,7 @@ jobs: needs: deploy-kernel permissions: contents: read + id-token: write if: needs.deploy-kernel.result == 'success' uses: ./.github/workflows/teams-kernel-workflows-deploy-team.yml secrets: From c6b2e212aff4823534756052d61530c32503c398 Mon Sep 17 00:00:00 2001 From: amaralc Date: Sun, 15 Feb 2026 12:21:02 -0300 Subject: [PATCH 2/3] fix(ci): avoid exposing project id --- .../teams-kernel-workflows-deploy-team.yml | 16 ++++++++++++++++ docs/insights-short-term.md | 6 +++--- teams/kernel/iac/production/backend.tf | 6 +++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/teams-kernel-workflows-deploy-team.yml b/.github/workflows/teams-kernel-workflows-deploy-team.yml index 52bd4a1a..4e49474c 100644 --- a/.github/workflows/teams-kernel-workflows-deploy-team.yml +++ b/.github/workflows/teams-kernel-workflows-deploy-team.yml @@ -91,6 +91,22 @@ jobs: - name: Generate Prisma client run: pnpm prisma:generate:postgres + - name: Generate Terraform Backend Configuration + working-directory: ${{ inputs.iac-path }} + env: + GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} + run: | + cat > backend.tf < Date: Sun, 15 Feb 2026 18:12:39 -0300 Subject: [PATCH 3/3] fix(ci): prevent failure due to absent secret --- .github/workflows/teams-kernel-workflows-deploy-team.yml | 8 +++++++- docs/insights-short-term.md | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/teams-kernel-workflows-deploy-team.yml b/.github/workflows/teams-kernel-workflows-deploy-team.yml index 4e49474c..1e64354f 100644 --- a/.github/workflows/teams-kernel-workflows-deploy-team.yml +++ b/.github/workflows/teams-kernel-workflows-deploy-team.yml @@ -21,7 +21,7 @@ on: DOMAIN_NAME: required: false GCP_PROJECT_ID: - required: false + required: true GCP_LOCATION: required: false SUPPORT_ACCOUNT_EMAIL: @@ -96,6 +96,11 @@ jobs: env: GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} run: | + if [ -z "$GCP_PROJECT_ID" ]; then + echo "❌ Error in 'Generate Terraform Backend Configuration' step: GCP_PROJECT_ID environment variable is empty" + echo " This variable is required to generate backend.tf configuration" + exit 1 + fi cat > backend.tf <