Skip to content

Commit df6b7a4

Browse files
committed
ci: split isos only when needed, bump max size and change naming format
1 parent 9103d1d commit df6b7a4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@ jobs:
3939
env:
4040
GC_DONT_GC: 1
4141
run: |
42-
for iso in $(nix flake show --json | nix run nixpkgs#jq -- -r keys[]); do
43-
nix build .#$iso
44-
split -d result/iso/*.iso -b 1G $iso.iso-part-
42+
for output in $(nix flake show --json | nix run nixpkgs#jq -- -r 'keys[]'); do
43+
nix build .#$output
44+
if [ $(du -B1M result/iso/*.iso | cut -f1) -gt 2000 ]; then
45+
split -d result/iso/*.iso -b 2000M nixos-$output.iso.part-
46+
else
47+
cp result/iso/*.iso nixos-$output.iso
48+
fi
4549
rm result
4650
done
4751
- name: Release
4852
uses: softprops/action-gh-release@v1
4953
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
5054
with:
51-
files: "*.iso-part-*"
55+
files: "nixos-*.iso*"

0 commit comments

Comments
 (0)