action-docker-layer-caching icon indicating copy to clipboard operation
action-docker-layer-caching copied to clipboard

docker/build-push-action now supports caching

Open mendhak opened this issue 10 months ago • 0 comments

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.

mendhak avatar Apr 07 '24 14:04 mendhak