GoogleCloudPlatform / gcr-cleaner

Delete untagged image refs in Google Container Registry or Artifact Registry
Apache License 2.0
805 stars 112 forks source link

Fixed shouldDelete function for mix of tag/no tag images #28

Closed RomanBelkov closed 3 years ago

RomanBelkov commented 3 years ago

I have a mixed image collection where images with no tags are placed next to the tagged images and that caused issues for the shouldDelete function because MatchString attempted to grab value from empty Tags array on non-tagged image. This complies with allow_tagged description in Readme and deletes both kind of images.