When using --cache-to type=registry,... there should be an option to ignore pushing errors.
We are using Nexus as a cache, and it's OK if the cache goes down or is unavailable. There is also a bug that means re-pushing a 100% cached image results in:
#19 ERROR: error writing manifest blob: failed commit on ref "sha256:69cb06c31697c5dc32fb2fd9949c98ec98783a3e7b2b2f2c0651623fe21dcb16": cannot reuse body, request must be retried
This is fine, Nexus is terrible, but we just want to ignore the error and not exit with a non-zero status code. Currently this seems impossible to do.