docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.1k stars 525 forks source link

Support multiple cache-from arguments #1118

Closed AdeelK93 closed 1 month ago

AdeelK93 commented 1 month ago

Description

Docker supports multiples caches - but there isn't really a way to provide multiple cache-from arguments.

One solution may be to allow sequences in the cache-from, perhaps like:

cache-from:
- type=registry,ref=<registry>/<cache-image>:<branch>
- type=registry,ref=<registry>/<cache-image>:main 
crazy-max commented 1 month ago

This is actually supported but correct syntax is:

cache-from: |
  type=registry,ref=<registry>/<cache-image>:<branch>
  type=registry,ref=<registry>/<cache-image>:main