Support to retain cache
This PR adds support to keep the cache state when the builder is removed in the post-action step. For certain usecases such as CI builds, it is helpful to keep the cache and reuse it with re-created builders. For this purpose, there is a new keep-state optional actions flag that defaults to false.
To support cache reuse, this PR also allows specifying a custom name to the builder, since cache reuse is no possible with the exiting random names generated using uuid.v4(). For this purpose, there is a new name optional actions flag.
Hey @crazy-max , can I get a review on this one?
/cc @jedevc
Thanks for the review @crazy-max. I've addressed your feedback.
We have been using this change at aptos-labs/aptos-core for over a month now with persistent self-hosted runners and have seen speed ups of up to 50% in build times.
https://github.com/aptos-labs/aptos-core/blob/751153f20f3068ed71cfe3d79ab9fe0212cc4107/.github/actions/docker-setup/action.yaml#L41-L58
@crazy-max can we get this merged please?
Any movement on this?
just stumpled upon this, the --keep-state flag in docker buildx rm for self-hosted runners could speed up builds drastically.
what is needed to get any movement on this?
@ibalajiarun @crazy-max can we take another look at this? Would be great to have.
This PR might be the missing piece of my ultimate caching pipeline quest. Any chance it will be merged in the near future?