Skip to content

feat(NOJIRA): add opt-in cache-from and cache-to inputs to image-multiarch - #288

Closed
adriancarayol wants to merge 1 commit into
mainfrom
feat/image-multiarch-cache-inputs
Closed

adriancarayol wants to merge 1 commit into
mainfrom
feat/image-multiarch-cache-inputs

Conversation

@adriancarayol

Copy link
Copy Markdown

Overview

Jira ticket: NOJIRA

image-multiarch.yaml creates a throwaway buildx builder in every job and passes no external cache, so every image build starts from zero. In Typeform/renderer the Louvre image takes 7 to 11 minutes per PR run, about 5 of them reinstalling the same dependencies.

This adds two opt-in inputs so a caller can point the build at a layer cache, for example in the service's own ECR repository.

Changes

  • New optional inputs cache-from and cache-to, passed as they are to docker/build-push-action in the "Build and push images" step.
  • Both default to an empty string, so callers that don't set them build exactly as before.

Example caller:

cache-from: type=registry,ref=${{ vars.IMAGE_REGISTRY }}/louvre:buildcache
cache-to: type=registry,ref=${{ vars.IMAGE_REGISTRY }}/louvre:buildcache,mode=max,image-manifest=true,oci-mediatypes=true

Testing

  • actionlint reports nothing new on the file.
  • A draft PR in Typeform/renderer calls this branch directly to measure a cold and a warm Louvre build. I will link it and add the numbers here.

Docs

  • Yes! ✋ I have updated the documentation.

🤖 Generated with Claude Code

…iarch

Each job builds with a throwaway buildx builder and no external cache, so
every image build starts from zero. The two new inputs are passed to
docker/build-push-action as they are. Both default to empty, so callers
that don't set them build exactly as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@adriancarayol

Copy link
Copy Markdown
Author

Closing: measured in Typeform/renderer#1773, a Louvre build with every install layer served from the registry cache took 8.8 minutes, against 7 to 11 minutes without it. Pulling the multi-GB node_modules layers costs about as much as installing them, and uploading the cache added 11.6 minutes when dependencies changed. No evidence the inputs help, so not adding them.

@adriancarayol
adriancarayol deleted the feat/image-multiarch-cache-inputs branch November 16, 2026 11:15
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