diff --git a/.github/workflows/delete-gcp-resources.yml b/.github/workflows/delete-gcp-resources.yml index fb44bf0b..5cfff8c0 100644 --- a/.github/workflows/delete-gcp-resources.yml +++ b/.github/workflows/delete-gcp-resources.yml @@ -73,13 +73,16 @@ jobs: # Deletes cache images older than $DELETE_AGE_DAYS days. # - # Keeps the latest $KEEP_LATEST_IMAGE_COUNT images of each type: + # Keeps all images younger than $DELETE_AGE_DAYS. + # Also keeps $KEEP_LATEST_IMAGE_COUNT older images of each type: # - zebrad checkpoint cache # - zebrad tip cache # - lightwalletd + zebrad tip cache # - # TODO: when we add testnet to the workflows, keep the latest $KEEP_LATEST_IMAGE_COUNT testnet images, - # and the latest $KEEP_LATEST_IMAGE_COUNT mainnet images. + # TODO: + # - keep the latest $KEEP_LATEST_IMAGE_COUNT, if there are at least that many recent images, delete all the outdated images + # - when we add testnet to the workflows, keep the latest $KEEP_LATEST_IMAGE_COUNT testnet images, + # and the latest $KEEP_LATEST_IMAGE_COUNT mainnet images. - name: Delete old cache disks run: | DELETE_BEFORE_DATE=$(date --date="$DELETE_AGE_DAYS days ago" '+%Y%m%d')