ci: give each Docker workflow its own gha cache scope#89
Merged
Conversation
docker-publish.yml and docker-fork.yml build the same Dockerfile and both fire on a fork PR, so they raced on the same default GHA cache scope and failed with 'error writing layer blob: failed to reserve cache'. Give each workflow a distinct cache scope (publish / fork) so their cache reservations no longer collide, and add a per-workflow concurrency group to cancel superseded runs on the same ref/PR. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
skjnldsv
enabled auto-merge
July 7, 2026 09:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Give `docker-publish.yml` and `docker-fork.yml` distinct GHA build-cache scopes (`publish` / `fork`), and add a per-workflow `concurrency` group that cancels superseded runs.
Why
On a fork PR both workflows fire and build the same Dockerfile. They shared the default `type=gha` cache scope, so their concurrent `cache-to` reservations collided:
```
ERROR: error writing layer blob: failed to reserve cache
ERROR: failed to build: failed to solve: error writing layer blob: failed to reserve cache
```
Seen on PR #87 (fork, labeled `ci: build image`) — the fork run and the publish build-only run started within ~3s of each other. Scoping the caches removes the collision; the concurrency groups keep only one live build per ref/PR.
Testing
AI-assisted change.