ci: share ISO build steps between test and release workflows#60
Open
phorcys420 wants to merge 1 commit into
Open
ci: share ISO build steps between test and release workflows#60phorcys420 wants to merge 1 commit into
phorcys420 wants to merge 1 commit into
Conversation
Extract the duplicated Nix-setup and image-build steps into two composite actions so the release workflow builds images the same way the test workflow does: - .github/actions/setup-nix: install Nix natively + cache /nix/store, with configurable cache prefix / gc cap (nix-images default, nix-flake/5G for the cheap flake-check job). - .github/actions/build-iso: build one image kind (full ISO or drv-only), dereferencing the image + .sha256 sidecar into a dist dir. release.yml and test.yml (flake + Images jobs) now use these shared actions. Release keeps the slow default compression and plain version names; test keeps its fast compression and PR/branch stamping via the action inputs.
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
Make the release workflow build images the same way the test workflow does by extracting the duplicated CI steps into two shared composite actions.
Why
release.ymlandtest.ymleach had their own copies of the "install Nix + cache /nix/store" boilerplate and themake <target>/iso→ dereference-ISO-and-.sha256build logic. They could drift apart. Sharing the steps guarantees releases and PR/test builds go through identical code.Changes
New composite actions
.github/actions/setup-nix— install Nix natively (nix-installer-action) + cache/nix/store(cache-nix-action). Inputscache-key-prefix(defaultnix-images) andgc-max-store-size(default8G) so the cheap flake-check job keeps its own smallernix-flake/5Gcache..github/actions/build-iso— build one image kind.make <target>/iso+ dereference the image and its.sha256sidecar into a dist dir, ormake <target>/drvwhenfull: false. Inputs:target,full,iso-compression,pr-title/pr-number/branch, optionaldist(test accumulates installer + appliance into one dir); outputdist.Workflows
release.yml— build job now usessetup-nix+build-iso. Passes no compression/PR inputs, so releases keep the slow nixpkgs default (small shipped ISOs) and plain version names — unchanged behavior.test.yml—flakejob usessetup-nix(nix-flake/5G);Imagesjob stages one dist dir then builds each kind viabuild-iso, keeping the fastzstd -Xcompression-level 3and PR/branch stamping. Downstream size-recording + per-kind artifact uploads unchanged.Notes
fmt.ymlstill has its own Nix setup; it's a formatting workflow (not image building), left out of scope.Validation
actionlintpasses clean.