From 4e7924f691dd591d31272b739d8385aa4b2fd843 Mon Sep 17 00:00:00 2001 From: splincode Date: Tue, 19 Nov 2024 21:02:54 +0300 Subject: [PATCH] ci: pin firebase channels --- .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