cache: enable gha cache backend if cache service v2 detected#3001
cache: enable gha cache backend if cache service v2 detected#3001crazy-max merged 2 commits intodocker:masterfrom
Conversation
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
|
Hum it fails to solve in our e2e test with: https://github.com/docker/buildx/actions/runs/13375533199/job/37353936009?pr=3001#step:9:388 I think that's because we only set So we need a fix on BuildKit as well. |
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
In this case it fails because we are pushing an empty Looking at github toolkit source code https://github.com/actions/toolkit/blob/2b08dc18f261b9fdd978b70279b85cbef81af8bc/packages/cache/src/internal/config.ts#L28-L33 they set either I think we should do the same in buildctl https://github.com/moby/buildkit/blob/de39e457a2c91179913c2eb303543f240ca793b3/cmd/buildctl/build/util.go#L28-L41 |
Done in moby/buildkit#5754 |
After testing latest RC, gha cache backend is always disabled when cache service v2 is detected. We forgot to check if
url_v2is set in #2983.Also fixes gha cache url handling to always set both
urlandurl_v2if possible to match fallback of github actions tookit.