action-docker-layer-caching
action-docker-layer-caching copied to clipboard
docker/build-push-action now supports caching
FWIW, it seems Docker's build-push-action now supports caching using the Github Cache API. Currently it's experimental but seems to work well in the little testing I've done.
It's just two arguments to the action, cache-from
and cache-to
.
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: user/app:latest
cache-from: type=gha
cache-to: type=gha,mode=max
Could be worth a look.