Build cache#1088
Open
featheredtoast wants to merge 3 commits into
Open
Conversation
allow for push and cache to be done by including bake config do local caching, for github actions cache. introduce datestamp for cache key use datestamps for cache invalidation
cleanup and remove untagged images from ghcr skip if cleanup token is not set
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.
Add build cache to builds, cache to ghcr. Cache by current date.
Refactor bake config: remove references to arch, and split up bake configuration to be able to compose image building into parts:
Allows for cache-read on PR, cache-read+write on main builds, push after tests on main.
For caching, we unfortunately explicitly need to run docker buildx bake TARGET for EVERY target individually. Targeting a group or multiple targets at the same time results in cache misses with seemingly no rhyme or reason - I'm guessing that despite each target having a separate cache-from/cache-to config, the cache-* sections are all grouped together across the entire build. Docker build caches apparently take the first matching cache, and discard the rest despite a cache-hit being possibly available in a different cache.
Allow cache to be flushed by searching for untagged images on ghcr, and delete
Fix test build to build every step from slim, previously the test release would build from base:release. Now it builds from the previous test build step
Publish runtime-deps-only image
prefer COPY to ADD as COPY for explicitly for copying docker contexts.