Repository navigation
Open
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
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 running bake-action like this:
- name: Build and push
uses: docker/bake-action@v6
env:
versions_string: ${{ steps.short-sha.outputs.sha }},latest
with:
push: true
files: |
./${{ matrix.package.directory }}/docker-bake.hcl
set: |
*.cache-from="type=gha"
*.cache-to="type=gha,mode=max"and I'm getting error:
ERROR: failed to solve: unknown cache exporter: "gha,mode=max"
I've searched for other issues in the repo, and my configuration matches what others have said in the past should work I think
Expected behaviour
Action uses gha docker cache
Actual behaviour
Image doesn't build due to error
Repository URL
No response
Workflow run URL
No response
YAML workflow
name: Development Build
on:
push:
branches:
- development
jobs:
determine-apps-affected:
# ....
build_image:
runs-on: ubuntu-22.04
needs: [determine-apps-affected]
strategy:
matrix:
package: ${{ fromJson(needs.determine-apps-affected.outputs.matrix) }}
steps:
- uses: benjlevesque/short-sha@v3.0
id: short-sha
with:
length: 6
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ${{ VARS.CONTAINER_REGISTRY }}
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build and push
uses: docker/bake-action@v6
env:
versions_string: ${{ steps.short-sha.outputs.sha }},latest
with:
push: true
files: |
./${{ matrix.package.directory }}/docker-bake.hcl
set: |
*.cache-from="type=gha"
*.cache-to="type=gha,mode=max"Workflow logs
No response
BuildKit logs
Additional info
No response
Activity
crazy-max commentedon Mar 7, 2025
This syntax looks correct:
But it should be:
I wonder if
csv-parselibrary has an issue parsing with quotes.Can you show the full logs of the
Build and pushstep please?crazy-max commentedon Mar 7, 2025
Ok I tried on my side and it gives:
{ "group": { "default": { "targets": [ "image" ] } }, "target": { "image": { "attest": [ { "builder-id": "https://github.com/docker/test-docker-action/actions/runs/13720577244/attempts/1", "inline-only": "true", "mode": "min", "type": "provenance" } ], "context": "https://github.com/docker/test-docker-action.git#032e801d9756d88af32f1c3acceea67f3446c6cf", "dockerfile": "./multistage.Dockerfile", "cache-from": [ { "type": "gha" } ], "cache-to": [ { "type": "gha,mode=max" } ], "platforms": [ "linux/amd64", "linux/arm64" ] } } }This is wrong though:
I tried locally with:
But works fine:
So I wonder if this has something to do with args passed to exec in GitHub's toolkit: https://github.com/actions/toolkit/blob/dc22dc7cad322ab3cf9280133face378c63195f7/packages/exec/src/exec.ts#L17