From 5af20019051d65c08a4469a58042517b62176084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=98=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= Date: Wed, 20 Nov 2024 10:21:23 +0300 Subject: [PATCH] ci: pin firebase channels (#9787) --- .github/workflows/cleanup-resources.yml | 17 ++++++++++++++--- .github/workflows/deploy-preview.yml | 3 ++- .github/workflows/e2e.yml | 3 ++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cleanup-resources.yml b/.github/workflows/cleanup-resources.yml index 32a79c8b2cb0..3242370569b9 100644 --- a/.github/workflows/cleanup-resources.yml +++ b/.github/workflows/cleanup-resources.yml @@ -20,15 +20,26 @@ jobs: gh cache delete $cacheId done - delete-firebase-channel: + delete-firebase-channels: runs-on: ubuntu-latest timeout-minutes: 10 + env: + channel: pr${{ github.event.number }}-${{ github.head_ref }} steps: - uses: actions/checkout@v4.2.2 - - uses: w9jds/firebase-action@v13.26.0 + - name: Drop e2e report site + uses: w9jds/firebase-action@v13.26.0 + continue-on-error: true + with: + args: hosting:channel:delete ${{ env.channel }}-e2e --site taiga-previews-demo-e2e-report -f + env: + GCP_SA_KEY: ${{ secrets.FIREBASE_TAIGA_PREVIEWS_SA }} + PROJECT_ID: taiga-previews + - name: Drop preview demo site + uses: w9jds/firebase-action@v13.26.0 continue-on-error: true with: - args: hosting:channel:delete pr${{ github.event.number }}-${{ github.head_ref }} --force + args: hosting:channel:delete ${{ env.channel }}-demo --site taiga-previews-demo -f env: GCP_SA_KEY: ${{ secrets.FIREBASE_TAIGA_PREVIEWS_SA }} PROJECT_ID: taiga-previews diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index b5c265c0f3be..645885856f53 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -17,8 +17,9 @@ jobs: uses: FirebaseExtended/action-hosting-deploy@v0 if: env.IS_OWNER_MODE == 'true' with: - repoToken: ${{ secrets.GITHUB_TOKEN }} + channelId: pr${{ github.event.number }}-${{ github.head_ref }}-demo firebaseServiceAccount: ${{ secrets.FIREBASE_TAIGA_PREVIEWS_SA }} + repoToken: ${{ secrets.GITHUB_TOKEN }} projectId: taiga-previews target: taiga-previews-demo expires: 1d diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 72241e3d9c36..051969d285ea 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -262,8 +262,9 @@ jobs: if: env.IS_OWNER_MODE == 'true' continue-on-error: true with: - repoToken: ${{ secrets.GITHUB_TOKEN }} + channelId: pr${{ github.event.number }}-${{ github.head_ref }}-e2e firebaseServiceAccount: ${{ secrets.FIREBASE_TAIGA_PREVIEWS_SA }} + repoToken: ${{ secrets.GITHUB_TOKEN }} projectId: taiga-previews expires: 1d target: taiga-previews-demo-e2e-report