diff --git a/.github/workflows/cd-deploy-nodes-gcp.yml b/.github/workflows/cd-deploy-nodes-gcp.yml index 41e55620418..f35fe986965 100644 --- a/.github/workflows/cd-deploy-nodes-gcp.yml +++ b/.github/workflows/cd-deploy-nodes-gcp.yml @@ -155,6 +155,7 @@ jobs: # This workflow also runs on release tags, the event name check will run it on releases. if: ${{ (!startsWith(github.event_name, 'pull') || !github.event.pull_request.head.repo.fork) && !inputs.no_cached_disk }} with: + environment: ${{ github.event_name == 'release' && 'prod' || 'dev' }} network: ${{ inputs.network || vars.ZCASH_NETWORK }} disk_prefix: zebrad-cache disk_suffix: ${{ inputs.cached_disk_type || 'tip' }} diff --git a/.github/workflows/sub-build-docker-image.yml b/.github/workflows/sub-build-docker-image.yml index bd7a492ec29..7710105900f 100644 --- a/.github/workflows/sub-build-docker-image.yml +++ b/.github/workflows/sub-build-docker-image.yml @@ -75,6 +75,7 @@ jobs: name: Build images timeout-minutes: 210 runs-on: ubuntu-latest + environment: ${{ inputs.environment }} outputs: image_digest: ${{ steps.docker_build.outputs.digest }} image_name: ${{ fromJSON(steps.docker_build.outputs.metadata)['image.name'] }} @@ -82,8 +83,6 @@ jobs: contents: 'read' id-token: 'write' pull-requests: write # for `docker-scout` to be able to write the comment - environment: - name: ${{ inputs.environment }} env: DOCKER_BUILD_SUMMARY: ${{ vars.DOCKER_BUILD_SUMMARY }} steps: diff --git a/.github/workflows/sub-deploy-integration-tests-gcp.yml b/.github/workflows/sub-deploy-integration-tests-gcp.yml index 182f22573d3..7b4cbb4449b 100644 --- a/.github/workflows/sub-deploy-integration-tests-gcp.yml +++ b/.github/workflows/sub-deploy-integration-tests-gcp.yml @@ -388,6 +388,10 @@ jobs: permissions: contents: 'read' id-token: 'write' + strategy: + matrix: + environment: ${{ github.ref_name == 'main' && fromJSON('["dev", "prod"]') || fromJSON('["dev"]') }} + environment: ${{ matrix.environment }} steps: - uses: actions/checkout@v4.2.2 with: @@ -667,7 +671,7 @@ jobs: --source-disk-zone=${{ vars.GCP_ZONE }} \ --storage-location=us \ --description="Created from commit ${{ env.GITHUB_SHA_SHORT }} with height ${{ env.SYNC_HEIGHT }} and database format ${{ env.DB_VERSION_SUMMARY }}" \ - --labels="height=${{ env.SYNC_HEIGHT }},purpose=${{ inputs.disk_prefix }},commit=${{ env.GITHUB_SHA_SHORT }},state-version=${{ env.STATE_VERSION }},state-running-version=${RUNNING_DB_VERSION},initial-state-disk-version=${INITIAL_DISK_DB_VERSION},network=${NETWORK},target-height-kind=${{ inputs.disk_suffix }},update-flag=${UPDATE_SUFFIX},force-save=${{ inputs.force_save_to_disk }},updated-from-height=${ORIGINAL_HEIGHT},updated-from-disk=${ORIGINAL_DISK_NAME},test-id=${{ inputs.test_id }},app-name=${{ inputs.app_name }}" + --labels="height=${{ env.SYNC_HEIGHT }},purpose=${{ inputs.disk_prefix }},branch=${{ env.GITHUB_REF_SLUG_URL }},commit=${{ env.GITHUB_SHA_SHORT }},state-version=${{ env.STATE_VERSION }},state-running-version=${RUNNING_DB_VERSION},initial-state-disk-version=${INITIAL_DISK_DB_VERSION},network=${NETWORK},target-height-kind=${{ inputs.disk_suffix }},update-flag=${UPDATE_SUFFIX},force-save=${{ inputs.force_save_to_disk }},updated-from-height=${ORIGINAL_HEIGHT},updated-from-disk=${ORIGINAL_DISK_NAME},test-id=${{ inputs.test_id }},app-name=${{ inputs.app_name }}" else echo "Skipped cached state update because the new sync height $SYNC_HEIGHT was less than $CACHED_STATE_UPDATE_LIMIT blocks above the original height $ORIGINAL_HEIGHT of $ORIGINAL_DISK_NAME" fi diff --git a/.github/workflows/sub-find-cached-disks.yml b/.github/workflows/sub-find-cached-disks.yml index f32801ce91e..d09d101b4b7 100644 --- a/.github/workflows/sub-find-cached-disks.yml +++ b/.github/workflows/sub-find-cached-disks.yml @@ -52,6 +52,7 @@ jobs: get-cached-disks: name: Get ${{ inputs.test_id || inputs.network }} cached disk runs-on: ubuntu-latest + environment: ${{ inputs.environment }} outputs: state_version: ${{ steps.get-available-disks.outputs.state_version }} cached_disk_name: ${{ steps.get-available-disks.outputs.cached_disk_name }}