◐ Off-By-One · answer catalog

github-actions-buildx-contexts

2 answer(s)godockergodocker

github-actions-buildx-contexts

📦 Source in repository (JSON)

Answer 1

Done. Solution written to ~/SOLUTION.md (verification script at ~/verify.mjs).

Summary

Root cause — two stacked errors in .github/workflows/docker.yml:

  1. Wrong input name. docker/build-push-action@v6 has no contexts input. Verified against the source: action.yml declares only build-contexts ("List of additional build contexts (e.g., name=path)"), and src/context.ts reads exactly core.getInput('build-contexts'). Everything under contexts: is silently never read → empty list → the buildx command gets zero --build-context flags (see getBuildArgs() in src/context.ts, which maps each parsed item to --build-context <item>).
  2. Wrong value syntax. Even with the right key, muster: ./muster (YAML map) is not the required name=path list form — buildx needs muster=./muster.

Without the flag, BuildKit's COPY --from=muster finds no matching stage/context, falls back to the image docker.io/library/muster:latest, and Docker Hub returns insufficient_scope — your exact #8 ERROR in ~3s. This also explains why commit 1d73b07 (which changed to contexts: | muster: ./muster) still failed: the key itself is ignored.

The fix:

build-contexts: |
  muster=./muster

Verification performed: - Source-level: confirmed via curl against the live v6 source (action.yml, src/context.ts Inputs interface/getBuildArgs, README table) — no contexts input exists anywhere. - Simulation (node verify.mjs): replicates the action's exact input parsing; shows buggy config → []/no flags, fixed config → --build-context muster=./muster. - CI check documented: the action's printed docker buildx build ... line shows the flag only after the fix.

Evidence & signatures

# Evidence
- Problem class: github-actions-buildx-contexts
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-16T17:51:58.533Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "docker/build-push-action@v6 ignores the nonexistent `contexts` input \u2014 the correct input is `build-contexts` as a name=path list (e.g. build-contexts: | muster=./muster). Using contexts: | muster: ./muster (YAML-map style) makes the action silently emit NO --build-context flag, so Dockerfile COPY --from=muster resolves to docker.io/library/muster:latest and the build fails with pull access denied/insufficient_scope in ~3s.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "github-actions-buildx-contexts", "provider": "openrouter", "solved_at": "2026-08-16T17:51:58.533Z", "version": ""}

Answer 2

Done. Solution written to ~/SOLUTION.md (verification script at ~/verify.mjs).

Summary

Root cause — two stacked errors in .github/workflows/docker.yml:

  1. Wrong input name. docker/build-push-action@v6 has no contexts input. Verified against the source: action.yml declares only build-contexts ("List of additional build contexts (e.g., name=path)"), and src/context.ts reads exactly core.getInput('build-contexts'). Everything under contexts: is silently never read → empty list → the buildx command gets zero --build-context flags (see getBuildArgs() in src/context.ts, which maps each parsed item to --build-context <item>).
  2. Wrong value syntax. Even with the right key, muster: ./muster (YAML map) is not the required name=path list form — buildx needs muster=./muster.

Without the flag, BuildKit's COPY --from=muster finds no matching stage/context, falls back to the image docker.io/library/muster:latest, and Docker Hub returns insufficient_scope — your exact #8 ERROR in ~3s. This also explains why commit 1d73b07 (which changed to contexts: | muster: ./muster) still failed: the key itself is ignored.

The fix:

build-contexts: |
  muster=./muster

Verification performed: - Source-level: confirmed via curl against the live v6 source (action.yml, src/context.ts Inputs interface/getBuildArgs, README table) — no contexts input exists anywhere. - Simulation (node verify.mjs): replicates the action's exact input parsing; shows buggy config → []/no flags, fixed config → --build-context muster=./muster. - CI check documented: the action's printed docker buildx build ... line shows the flag only after the fix.

Evidence & signatures

# Evidence
- Problem class: github-actions-buildx-contexts
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-16T17:51:58.533Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "docker/build-push-action@v6 ignores the nonexistent `contexts` input \u2014 the correct input is `build-contexts` as a name=path list (e.g. build-contexts: | muster=./muster). Using contexts: | muster: ./muster (YAML-map style) makes the action silently emit NO --build-context flag, so Dockerfile COPY --from=muster resolves to docker.io/library/muster:latest and the build fails with pull access denied/insufficient_scope in ~3s.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "github-actions-buildx-contexts", "provider": "openrouter", "solved_at": "2026-08-16T17:51:58.533Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog