Repository navigation
ci: add installer ISO build + release workflows #3
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
| # Eval Nix — fast validation that the flake still evaluates and the ISO | |
| # derivations instantiate. | |
| # | |
| # Unlike Build ISO / Build and release ISO (which realise the full multi-GB | |
| # images and only run for ready PRs / tags), this is cheap and runs on EVERY | |
| # commit and pull request. It instantiates the installer + appliance ISO | |
| # derivations via the Makefile's `*/drv` targets — i.e. fully evaluates the Nix | |
| # and writes the .drv to the store, but never builds the image. A typo, bad | |
| # reference, or type error in the Nix surfaces here in seconds instead of after | |
| # a long image build. | |
| # | |
| # Both architectures are instantiated on a single x86_64 runner: evaluating an | |
| # aarch64-linux derivation needs no aarch64 builder (only realisation would). | |
| # The eval runs inside the nixos/nix container via `docker run` for the same | |
| # reason as the other workflows — that image lacks a glibc loader for GitHub's | |
| # bundled Node, so JS actions (checkout) stay on the host runner. | |
| name: Eval Nix | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # Re-eval on every PR commit too (synchronize), plus open/reopen. This is | |
| # the cheap per-commit gate, so unlike Build ISO we DO want synchronize. | |
| types: [opened, reopened, synchronize] | |
| workflow_dispatch: | |
| concurrency: | |
| group: eval-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| eval: | |
| name: instantiate ISO derivations | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Instantiate ISO derivations (in nixos/nix container) | |
| run: | | |
| docker run --rm \ | |
| -v "$PWD":/work -w /work \ | |
| nixos/nix:latest \ | |
| sh -euc ' | |
| export NIX_CONFIG="experimental-features = nix-command flakes" | |
| git config --global --add safe.directory /work | |
| # `*/drv` targets evaluate .drvPath (instantiate without build). | |
| # Do both arches for each image; aarch64 eval needs no builder. | |
| nix-shell -p gnumake git --run " | |
| make installer/drv/x86_64-linux installer/drv/aarch64-linux \ | |
| appliance/drv/x86_64-linux appliance/drv/aarch64-linux | |
| " | |
| ' |