mr-smithers-excellent / docker-build-push

Docker Build & Push GitHub Action
MIT License
280 stars 62 forks source link

Why is there no switch to set whether to push all tags? #232

Closed guomaoqiu closed 4 months ago

guomaoqiu commented 5 months ago

Hello, when I used this plug-in, I found that every time I push, the image on the github runner will be pushed again. When my container is not cleaned, a lot of images will accumulate on it, which will cause my working time. Variable length. I read your source code and used the --all-tags flag when pushing. Can you make it an optional option, the latest tag or all tags?

image

guomaoqiu commented 5 months ago

My requirement is to only push the most recently built image tag.

mr-smithers-excellent commented 5 months ago

Hi @guomaoqiu. Can you supply your workflow configuration please? Also, are you using a local or hosted runner?

guomaoqiu commented 5 months ago

Hi @guomaoqiu. Can you supply your workflow configuration please? Also, are you using a local or hosted runner?

Thank you for your reply;

  1. The workflow is as follows: https://github.com/nervosnetwork/ckb-explorer/blob/develop/.github/workflows/build.yml.
  2. Using github hosting runner.

You can also see from the history records that when a lot of images are accumulated on the runner, all images will be pushed every time, which delays the developer's work progress. Please help solve the problem. The following example is: https://github.com/nervosnetwork/ckb-explorer/actions/runs/8596993633/job/23554704007

You can also see a comment from the workflow that after deleting 70 images, the speed details have improved a lot, but this needs to be cleaned regularly. I will have a way to deal with this. The current demand is to push only the most recent tag.

Clean the history after image: https://github.com/nervosnetwork/ckb-explorer/actions/runs/8610666403/job/23596568177

mr-smithers-excellent commented 5 months ago

I think this might have something to do with the Docker caching that you're using here. This action does not seem to be actively supported, I wouldn't recommend using it. The last release was in 2020.

If you really need to use caching, I would go with Docker's solution. Otherwise, I'd advise you to remove it and try the action again.