File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ for image_name in ${IMAGE_NAMES[@]}; do
7373 # list containers of the image name
7474 echo " Command" gcloud container images list-tags \
7575 ${image_name} \
76- --sort-by=TIMESTAMP --filter=" NOT tags:latest AND timestamp.datetime < $DELETE_BEFORE_DAY " \
76+ --sort-by=TIMESTAMP --filter=" NOT tags:( latest,2.*.0) AND timestamp.datetime < $DELETE_BEFORE_DAY " \
7777 --format=" get(digest,timestamp.year)"
7878 STALE_IMAGES=$( gcloud container images list-tags \
7979 ${image_name} \
80- --sort-by=TIMESTAMP --filter=" NOT tags:latest AND timestamp.datetime < $DELETE_BEFORE_DAY " \
80+ --sort-by=TIMESTAMP --filter=" NOT tags:( latest,2.*.0) AND timestamp.datetime < $DELETE_BEFORE_DAY " \
8181 --format=" get(digest,timestamp.year)" )
8282
8383 STALE_IMAGES_CURRENT=($STALE_IMAGES )
You can’t perform that action at this time.
0 commit comments