docker / docker/bake-action

Cache not working

Open
#245 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/needs-investigation
Dominant language
TypeScript
Stars
301
Forks
43
Avg merge
2d 5h
Merged PRs (30d)
20

Description

Contributing guidelines
I've found a bug, and:
  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem
Description

I'm trying to use this action to build a multi stage image using a docker compose configuration file. The build is working correctly and the images are pushed to the Google Artifacts registry just fine, but subsequent builds are not taking advantage of the layers cache even though nothing in the repository changed at all.

Screenshot 2024-09-01 at 19 07 08
Expected behaviour

I would expect this to be way higher than 0%

Actual behaviour

Cache seem not to be used at all?

Repository URL

No response

Workflow run URL

No response

YAML workflow
# Setup gcloud CLI
      - uses: "google-github-actions/setup-gcloud@v2"
        if: ${{ env.dryRun == 'false' }}
        with:
          project_id: ${{ env.GCP_PROJECT_ID }}
          version: "482.0.0"

      # This gives us access to buildx
      - name: Set up Docker CLI
        uses: docker/setup-buildx-action@v3

      # Configure Docker to use the gcloud command-line tool as a credential
      # helper for authentication
      - if: ${{ env.dryRun == 'false' }}
        run: |-
          gcloud --quiet auth configure-docker

      # Get the GKE credentials so we can deploy to the cluster
      - uses: google-github-actions/get-gke-credentials@db150f2cc60d1716e61922b832eae71d2a45938f
        if: ${{ env.dryRun == 'false' }}
        with:
          cluster_name: ${{ env.GKE_CLUSTER }}
          location: ${{ env.GCP_LOCATION }}

      - name: Build and Push Docker Images
        uses: docker/bake-action@v5
        env:
          TAG: ${{ steps.release-tag.outputs.tag }}
        with:
          source: "."
          files: "compose.yaml"
          workdir: "./docker"
          push: ${{ env.dryRun == 'false' }}
          load: true
Workflow logs

No response

BuildKit logs

No response

Additional info

No response

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.

Research direction

Start with the workflow's docker/bake-action@v5 step, compose.yaml, and the surrounding Buildx setup; investigate the cache configuration and the missing workflow and BuildKit logs. Done means a subsequent unchanged build reuses layers, demonstrated by logs or a reproducible workflow configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, github-actions, google-cloud
Domain
build-system, ci-cd, cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.