Skip to content

Commit

Permalink
fix: only try to delete untagged images
Browse files Browse the repository at this point in the history
  • Loading branch information
danistrebel committed Aug 28, 2023
1 parent 2e1e923 commit 38754e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/pipeline-runner/image-clean.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ steps:
echo "Cleaning stale versions of: $$IMAGE_URI"
VERSIONS_TO_CLEAN=$(gcloud artifacts docker images list "$$IMAGE_URI" \
--include-tags \
--filter="UPDATE_TIME.date('%Y-%m-%d', Z)<=$(date --date="-${_IMAGE_RETENTION_MIN} days" +'%Y-%m-%d')" \
--filter="UPDATE_TIME.date('%Y-%m-%d', Z)<=$(date --date="-${_IMAGE_RETENTION_MIN} days" +'%Y-%m-%d') AND -TAGS:*" \
--format='value(VERSION)')
if [ -z "$$VERSIONS_TO_CLEAN" ]; then
Expand Down

0 comments on commit 38754e0

Please sign in to comment.