Skip to content

Commit f2b1db9

Browse files
authored
Merge pull request #272 from QuantStrategyLab/ci/safe-cloud-run-cleanup
ci: retain Firstrade rollback artifacts by default
2 parents deddb78 + fa23bce commit f2b1db9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/sync-cloud-run-env.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
env:
3535
ENABLE_GITHUB_CLOUD_RUN_DEPLOY: ${{ vars.ENABLE_GITHUB_CLOUD_RUN_DEPLOY }}
3636
ENABLE_GITHUB_ENV_SYNC: ${{ vars.ENABLE_GITHUB_ENV_SYNC }}
37+
CLOUD_RUN_CLEANUP_ENABLED: ${{ vars.CLOUD_RUN_CLEANUP_ENABLED }}
3738
ENABLE_MAIN_PUSH_CLOUD_RUN_AUTOMATION: ${{ vars.ENABLE_MAIN_PUSH_CLOUD_RUN_AUTOMATION }}
3839
QSL_ENABLE_CLOUD_RUN_AUTOMATION: ${{ vars.QSL_ENABLE_CLOUD_RUN_AUTOMATION }}
3940
CLOUD_RUN_REGION: ${{ vars.CLOUD_RUN_REGION }}
@@ -362,7 +363,7 @@ jobs:
362363
fi
363364
364365
- name: Wait for Cloud Run deployment of current commit
365-
if: steps.env_sync_config.outputs.enabled == 'true'
366+
if: steps.deploy_config.outputs.enabled == 'true' && steps.env_sync_config.outputs.enabled == 'true'
366367
run: |
367368
set -euo pipefail
368369
@@ -988,7 +989,7 @@ jobs:
988989
python scripts/reconcile_cloud_runtime.py scheduler-cleanup
989990
990991
- name: Clean up old Cloud Run revisions and images
991-
if: steps.deploy_config.outputs.enabled == 'true'
992+
if: steps.deploy_config.outputs.enabled == 'true' && env.CLOUD_RUN_CLEANUP_ENABLED == 'true'
992993
run: |
993994
set -euo pipefail
994995

0 commit comments

Comments
 (0)