Repository navigation
Conversation
Enable GitHub Actions layer caching (`type=gha`, `mode=max`) per architecture in `build-latest.yml` and reorder layers in `deployment/urunc-deploy/Dockerfile` so builder stages, Go module downloads, and package installations remain cached across commits. Pin `kubectl` through the `KUBECTL_VERSION` build argument, so that cached builds stay reproducible, and disable the cache for version-tag builds, so that releases always pick up package updates. Refs urunc-dev#1096 Signed-off-by: Divyam Agarwal <iitdivyamagarwal@gmail.com>
✅ Deploy Preview for urunc canceled.
|
This branch has not been deployed
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.
Enable Buildx layer caching for the
urunc-deployimage and reorder Dockerfile layers to avoid rebuilding unchanged dependencies. This follows up on #1102 and #1170.Changes
type=gha,mode=max) scoped by architecture.ARG COMMITjust beforemakeso changing the commit SHA doesn't invalidate earlier layers.kubectltov1.37.2instead of fetching the latest version during the build.Notes
The image is only built on pushes to
main, so the Dockerfile changes were tested locally.kubectlis now pinned tov1.37.2. This needs manual updates since Dependabot doesn't track Docker versions.docs/variables/versions.ymlcurrently lists1.30.0, so I'm happy to align the version if needed.The cache uses
mode=max, which also stores intermediate layers. If the GitHub Actions 10 GB cache limit becomes an issue, we can switch to a registry cache.Related issues
Refs #1096
How was this tested?
x86_64using Docker Buildx.urunc --version,kubectl version --clientand the image contents.COMMITand confirmed only the affected build and copy steps reran, while dependency downloads and package installation remained cached.The
arm64build and GitHub Actions cache backend still need to be verified by CI.LLM usage
Google Gemini (via Antigravity) assisted with the Dockerfile layer ordering and workflow changes. I reviewed the changes and tested the build locally.
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).