ci: split isos only when needed, bump max size and change naming format
This commit is contained in:
parent
9103d1dc46
commit
df6b7a4812
1 changed files with 8 additions and 4 deletions
12
.github/workflows/CI.yml
vendored
12
.github/workflows/CI.yml
vendored
|
|
@ -39,13 +39,17 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GC_DONT_GC: 1
|
GC_DONT_GC: 1
|
||||||
run: |
|
run: |
|
||||||
for iso in $(nix flake show --json | nix run nixpkgs#jq -- -r keys[]); do
|
for output in $(nix flake show --json | nix run nixpkgs#jq -- -r 'keys[]'); do
|
||||||
nix build .#$iso
|
nix build .#$output
|
||||||
split -d result/iso/*.iso -b 1G $iso.iso-part-
|
if [ $(du -B1M result/iso/*.iso | cut -f1) -gt 2000 ]; then
|
||||||
|
split -d result/iso/*.iso -b 2000M nixos-$output.iso.part-
|
||||||
|
else
|
||||||
|
cp result/iso/*.iso nixos-$output.iso
|
||||||
|
fi
|
||||||
rm result
|
rm result
|
||||||
done
|
done
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
|
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
|
||||||
with:
|
with:
|
||||||
files: "*.iso-part-*"
|
files: "nixos-*.iso*"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue