mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 04:08:12 +09:00
ci
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Reference: https://github.com/ryoppippi/dotfiles/blob/main/.github/workflows/nix-build.yaml
|
||||
name: Check NixOS configurations
|
||||
description: Build every NixOS configuration and the Registry tests
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Build every NixOS configuration
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
mapfile -t hosts < <(
|
||||
nix eval --raw .#nixosConfigurations \
|
||||
--apply 'configs: builtins.concatStringsSep "\n" (builtins.attrNames configs)'
|
||||
)
|
||||
|
||||
installables=(.#checks.x86_64-linux.registry)
|
||||
for host in "${hosts[@]}"; do
|
||||
installables+=(".#nixosConfigurations.${host}.config.system.build.toplevel")
|
||||
done
|
||||
|
||||
nix build \
|
||||
--keep-going \
|
||||
--no-link \
|
||||
--print-build-logs \
|
||||
--show-trace \
|
||||
"${installables[@]}"
|
||||
Reference in New Issue
Block a user