-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.24 KB
/
build_iso.yml
File metadata and controls
49 lines (39 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build and Tag ISO
on:
push:
branches:
- main
jobs:
build-iso:
if: startsWith(github.event.head_commit.message, 'build-iso')
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Generate Tag Name
run: |
echo "TAG_NAME=$(date +"iso-%Y%m%d-%H%M%S")" >> $GITHUB_ENV
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build ISO
run: |
ISO_PATH=$(NIX_BUILD_CORES=$(nproc) nix run nixpkgs#nixos-generators --accept-flake-config -- --format iso --flake .#nixiso -o result)
echo "$ISO_PATH : $(du -h $ISO_PATH)"
echo $ISO_PATh > iso_path
split $ISO_PATH -b 1900000000 ISO_PART_
for PART in ISO_PART_*; do
sha256sum $PART > "sha256_${PART}"
done
- name: Create Release
uses: softprops/action-gh-release@v2
with:
prerelease: true
name: ${{ env.TAG_NAME }}
tag_name: ${{ env.TAG_NAME }}
files: |
ISO_PART_*
sha256_*