Multiarch docker images with buildkit and cache upload fail


I have a kubernetes cluster (k3s, with amd64 and arm64 machines), and I have deployed a gitea instance (chart=gitea-0.0.3 version=1.17.3, with postgresql and memcached). I want to build multi-arch docker images, so I have installed drone (2.15.0) with the drone-runner-kubernetes (1.0.0-rc.3).

When I try to build multi-arch image with docker buildx --cache-to=..., I have a error for cache upload (buildx log):


In gitea logs, I have :

2022/11/09 10:57:05 [636aecd1-2] router: completed PUT /v2/<org>/<project>/manifests/<tag> for, 400 Bad Request in 48.4ms @ container/container.go:440(container.UploadManifest)

How can I give more info to help fix this problem ?

I have looked inside gitea source code, it seams that the mediatype used by buildkit cache is not recognized by gitea (/routers/api/packages/container/manifest.go func processManifest, returns errManifestInvalid), but request mime type looks good
There is an other use case of errManifestInvalid, in func processImageManifestIndex.