1020 B
1020 B
| id | type | title | tags | importance | confidence | created | updated | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 77cf0fb1-9a58-43d2-b1d2-6532bafa6204 | solution | Gitea Actions: Docker buildx cache auth requires login on all builds |
|
0.7 | 0.8 | 2026-02-13T21:09:47.183681+00:00 | 2026-02-13T21:09:47.183681+00:00 |
When using Docker buildx with registry-based cache (cache-from/cache-to type=registry), the Docker Hub login step must run on ALL builds (both PR and main), not just main branch. Without login, PR builds fail on second run with 'push access denied' when trying to write cache layers.
Fix: Remove 'if: github.ref == refs/heads/main' condition from Docker Hub login step in workflow template. The push flag on build-push-action still gates actual image publishing to main-only.
Template: server-configs/gitea/workflow-templates/docker-build-template.yml Error manifests on SECOND build because first build creates cache successfully, but subsequent builds fail when overwriting existing layers without auth.