Stuck in "exporting to GitHub Actions Cache / preparing build cache for export" using github actions cache

Open
#4,628 8 comments 24 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, github-actions

Research direction

Start with the supplied docker/setup-buildx-action@v3 and docker/build-push-action@v5 workflow, especially cache-from/cache-to type=gha and the BuildKit container log. Reproduce the stall at “preparing build cache for export” and determine why the GitHub Actions cache export does not complete. Done means identifying the cause and documenting or fixing the export failure.

Written by the indexing model from the issue text.

Description

Hi all!
Currently, I'm encountering some issues while uploading the cache to GitHub Actions. I've been stuck for hours with the following problem:

#48 exporting to GitHub Actions Cache
#48 preparing build cache for export

I captured the following log from the buildkit container:

image

The "-------------------------- AFTER ALMOST 30 MINUTES --------------------------" was added by me.

Currently, I'm using the following version tags:

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v3

- name: Build and push with cache
  uses: docker/build-push-action@v5
  env:
    DOCKER_BUILDKIT: 1
  with:
    context: ${{ inputs.dockerContext }}
    push: ${{ inputs.dockerPush }}
    file: ${{ inputs.dockerfilePath }}
    tags: ${{ inputs.legacyMode == 'true' && steps.ids-legacy.outputs.tags || steps.ids-not-legacy.outputs.tags }}
    platforms: ${{ inputs.buildPlatform }}
    cache-from: type=gha
    cache-to: type=gha,mode=max
    build-args: ${{ inputs.dockerBuildArgs }}
    provenance: false

Has anyone else encountered this issue before?

Ty in advance!

Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moby/buildkit

All issues in moby/buildkit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.