Closed yspreen closed 3 years ago
You would just run gcr-cleaner-cli -whatever-flags-you-want
during your CI step. For container-based systems, you can use the pre-packaged docker containers. The example and flags are heavily dependent on your intended use case.
I actually found that google's own sdk container works a lot better for this purpose. I compiled a gist here, if anyone's interested: https://gist.github.com/yspreen/fe6bfd7eabeffe82a84f71616ab0cffe
I have a gitlab ci version of this too
It's too late for me now, but I think someone stumbling upon the thread might enjoy the link @cakeben :)
I think most people collect old images because they push to gcr in a ci cd pipeline. It would be awesome to have minimum examples to run this container in CLI mode for github actions and maybe also travis or gitlab ci