Docker BuildKit supports cache. It would reduce time to build an image, especially for multistage Dockerfile. This article explains efficient cache strategy in pull request based development flow. Problem to solve You can import and export cache by passing the following config to docker/build-push-action: - uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=IMAGE
cache-to: type=registry,ref=IMAGE,mode=max