From 83a2e34ebccc1c0f544d468a452bf2564dc0aa91 Mon Sep 17 00:00:00 2001 From: Gustavo Valverde Date: Tue, 14 Jan 2025 11:41:38 +0000 Subject: [PATCH] fix(workflows): update environment assignment logic for CI configurations - Changed environment assignment in `cd-deploy-nodes-gcp.yml`, `sub-build-docker-image.yml`, and `sub-find-cached-disks.yml` to use 'dev' as a fallback when the event is not a release, to avoid a `false` fallback --- .github/workflows/cd-deploy-nodes-gcp.yml | 2 +- .github/workflows/sub-build-docker-image.yml | 2 +- .github/workflows/sub-find-cached-disks.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-deploy-nodes-gcp.yml b/.github/workflows/cd-deploy-nodes-gcp.yml index 2872fdb64e6..b515179732b 100644 --- a/.github/workflows/cd-deploy-nodes-gcp.yml +++ b/.github/workflows/cd-deploy-nodes-gcp.yml @@ -239,7 +239,7 @@ jobs: timeout-minutes: 60 env: CACHED_DISK_NAME: ${{ needs.get-disk-name.outputs.cached_disk_name }} - environment: ${{ github.event_name == 'release' && 'prod' }} + environment: ${{ github.event_name == 'release' && 'prod' || 'dev' }} permissions: contents: 'read' id-token: 'write' diff --git a/.github/workflows/sub-build-docker-image.yml b/.github/workflows/sub-build-docker-image.yml index 60205b69be5..82083b53be0 100644 --- a/.github/workflows/sub-build-docker-image.yml +++ b/.github/workflows/sub-build-docker-image.yml @@ -70,7 +70,7 @@ jobs: name: Build images timeout-minutes: 210 runs-on: ubuntu-latest - environment: ${{ github.event_name == 'release' && 'prod' }} + environment: ${{ github.event_name == 'release' && 'prod' || 'dev' }} outputs: image_digest: ${{ steps.docker_build.outputs.digest }} image_name: ${{ fromJSON(steps.docker_build.outputs.metadata)['image.name'] }} diff --git a/.github/workflows/sub-find-cached-disks.yml b/.github/workflows/sub-find-cached-disks.yml index 82da4af9f21..a45e3f731fa 100644 --- a/.github/workflows/sub-find-cached-disks.yml +++ b/.github/workflows/sub-find-cached-disks.yml @@ -48,7 +48,7 @@ jobs: get-cached-disks: name: Get ${{ inputs.test_id || inputs.network }} cached disk runs-on: ubuntu-latest - environment: ${{ github.event_name == 'release' && 'prod' }} + environment: ${{ github.event_name == 'release' && 'prod' || 'dev' }} outputs: state_version: ${{ steps.get-available-disks.outputs.state_version }} cached_disk_name: ${{ steps.get-available-disks.outputs.cached_disk_name }}