github-actions-cache-server icon indicating copy to clipboard operation
github-actions-cache-server copied to clipboard

A question about docker buildx cache upload in the latest release

Open enkhjile opened this issue 8 months ago • 1 comments

@LouisHaftmann
Thanks for your amazing service. This cache server is really helping me a lot.

There was a change in the latest release: docker buildx cache upload. Does this mean it now supports Docker Buildx caches? I tried using docker/build-push-action as shown below, but it failed.

- name: Build and push
  uses: docker/build-push-action@v6
  with:
    context: .
    push: true
    tags: ${{ steps.login-ecr.outputs.registry }}/${{ vars.ECR_REPO }}:${{ steps.vars.outputs.version }}
    cache-from: type=gha
    cache-to: type=gha,mode=max
    provenance: false
    platforms: linux/amd64

The error pointed to a breaking change in GitHub Actions:

#8 importing cache manifest from gha:11113334206725156320
#8 ERROR: This legacy service is shutting down, effective April 15, 2025. Migrate to the new service ASAP. For more information: https://gh.io/gha-cache-sunset

I've been using a workaround to cache Docker layers (https://github.com/docker/build-push-action/issues/252) and was excited about these changes, but I couldn't quite get it to work. Your help would be much appreciated. Thanks again!

enkhjile avatar May 23 '25 05:05 enkhjile

This error occurs if you're still using cache service v1. The problem could be that docker cannot find ACTIONS_RESULTS_URL env var and defaults to using v1 cache. Try checking actions debug logs, it should display the cache url.

Keep in mind that there still is an issue with docker where the upload just fails without any error message when using a custom cache server. I haven't been able to find a fix yet so you might want to stick to your current solution.

LouisHaftmann avatar May 23 '25 05:05 LouisHaftmann

Docker build cache finally works https://github.com/falcondev-oss/github-actions-cache-server/releases/tag/v8.1.0

LouisHaftmann avatar Jun 26 '25 15:06 LouisHaftmann

@LouisHaftmann awesome 🤩

enkhjile avatar Jun 26 '25 16:06 enkhjile