Skip to content

[DX-3383] Fix Docker caching#1485

Closed
kalverra wants to merge 2 commits into
mainfrom
dockerCaching
Closed

[DX-3383] Fix Docker caching#1485
kalverra wants to merge 2 commits into
mainfrom
dockerCaching

Conversation

@kalverra
Copy link
Copy Markdown
Contributor

@kalverra kalverra commented Mar 25, 2026

.github/actions/build-push-docker/action.yml -- 3 changes

Bug fix

Output names cache-from and cache-to (lines 308, 314) were renamed to docker-cache-from and docker-cache-to to match the references on lines 340-341. This fixes Docker layer caching that was silently broken -- cache-from and cache-to were always resolving to empty strings because the output names didn't match the references.

New input

docker-build-cache-scope (lines 48-54) -- optional, defaults to empty. When provided, overrides runner.arch as the cache scope. This lets callers separate caches for different Dockerfiles building on the same architecture.

Scope wiring (lines 297-303): The format() call now uses inputs.docker-build-cache-scope || runner.arch instead of just runner.arch.

github/actions/ctf-build-image/action.yml -- 2 changes

New input

cache-scope (lines 111-117) -- passed through to build-push-docker as docker-build-cache-scope.

Always restore cache (line 193): Changed docker-restore-cache from ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }} to "true". Push builds (develop merges) will now benefit from cached layers instead of rebuilding from scratch.

Results

@kalverra kalverra closed this Mar 25, 2026
@kalverra kalverra deleted the dockerCaching branch March 25, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant