Use a CI/CD pipeline to build containers automatically (multi-branch for each git commit) and deploy them to the container registry. Run automated tests on each container build in the Kubernetes cluster. Promote specific images to production.
Most of the images are not needed anymore after the automated tests have run. The containers promoted for production for sure are still needed and get a special tag.
This produces a lot of images in the container registry that need to be cleaned up manually or by implementing custom rules using the api or doctl.
Have container registry cleanup policies that automatically delete unused containers. Such policies could look like:
"from repository myrepo keep the newest 5 images which match a regex"
These policies could be run for example once a week, or with a cron tab like schedule.