Consolidates 8 closures to only 4 by using a git branch selector that sets the values for -dev variants of each closure. Reference the 'Verifying KioskConfig builds are in the right branch' note in Obsidian for more reference.
92 lines
3.7 KiB
YAML
92 lines
3.7 KiB
YAML
name: Build Dev ISOs
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- dev
|
|
env:
|
|
NIX_CONFIG: |
|
|
extra-substituters = https://attic.radiantwavetech.com/radiantwave-dev
|
|
extra-trusted-public-keys = radiantwave-dev:B8FhLu3MQ9JfeEIHIKNrKxnP+3akzzkqMbTZR4hRfj0=
|
|
jobs:
|
|
build-dev-kiosk:
|
|
runs-on: build-server
|
|
steps:
|
|
- name: Clone Repository
|
|
run: git clone --depth 1 --no-single-branch ssh://git@gitea.radiantwavetech.com:2222/RadiantWaveTech/KioskConfig.git .
|
|
- name: Checkout dev branch
|
|
run: git checkout dev
|
|
- name: Prepare output directory
|
|
run: mkdir -p /home/user/radiantwave
|
|
- name: Build dev kiosk ISO
|
|
run: |
|
|
export NIXPKGS_ALLOW_UNFREE=1
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
nix build -L --impure .#nixosConfigurations.kiosk-iso.config.system.build.isoImage
|
|
- name: Rename dev kiosk ISO
|
|
run: |
|
|
ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
|
FILENAME="radiantwave-kiosk-dev-${ISO_DATE}.iso"
|
|
cp -L result/iso/*.iso "/home/user/radiantwave/${FILENAME}"
|
|
echo "FILENAME=${FILENAME}" >> "$GITHUB_ENV"
|
|
- name: Copy dev kiosk ISO to fileserver
|
|
run: |
|
|
scp "/home/user/radiantwave/${FILENAME}" \
|
|
radiantwave-infra:/mnt/infrastructure_data/files/images/
|
|
- name: Cleanup
|
|
run: rm -f "/home/user/radiantwave/${FILENAME}"
|
|
|
|
build-dev-android:
|
|
runs-on: build-server
|
|
steps:
|
|
- name: Clone Repository
|
|
run: git clone --depth 1 --no-single-branch ssh://git@gitea.radiantwavetech.com:2222/RadiantWaveTech/KioskConfig.git .
|
|
- name: Checkout dev branch
|
|
run: git checkout dev
|
|
- name: Prepare output directory
|
|
run: mkdir -p /home/user/radiantwave
|
|
- name: Build dev android ISO
|
|
run: |
|
|
export NIXPKGS_ALLOW_UNFREE=1
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
nix build -L --impure .#nixosConfigurations.android-iso.config.system.build.isoImage
|
|
- name: Rename dev android ISO
|
|
run: |
|
|
ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
|
FILENAME="radiantwave-android-dev-${ISO_DATE}.iso"
|
|
cp -L result/iso/*.iso "/home/user/radiantwave/${FILENAME}"
|
|
echo "FILENAME=${FILENAME}" >> "$GITHUB_ENV"
|
|
- name: Copy dev android ISO to fileserver
|
|
run: |
|
|
scp "/home/user/radiantwave/${FILENAME}" \
|
|
radiantwave-infra:/mnt/infrastructure_data/files/images/
|
|
- name: Cleanup
|
|
run: rm -f "/home/user/radiantwave/${FILENAME}"
|
|
|
|
build-dev-commercial:
|
|
runs-on: build-server
|
|
steps:
|
|
- name: Clone Repository
|
|
run: git clone --depth 1 --no-single-branch ssh://git@gitea.radiantwavetech.com:2222/RadiantWaveTech/KioskConfig.git .
|
|
- name: Checkout dev branch
|
|
run: git checkout dev
|
|
- name: Prepare output directory
|
|
run: mkdir -p /home/user/radiantwave
|
|
- name: Build dev commercial ISO
|
|
run: |
|
|
export NIXPKGS_ALLOW_UNFREE=1
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
nix build -L --impure .#nixosConfigurations.commercial-iso.config.system.build.isoImage
|
|
- name: Rename dev commercial ISO
|
|
run: |
|
|
ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
|
FILENAME="radiantwave-commercial-dev-${ISO_DATE}.iso"
|
|
cp -L result/iso/*.iso "/home/user/radiantwave/${FILENAME}"
|
|
echo "FILENAME=${FILENAME}" >> "$GITHUB_ENV"
|
|
- name: Copy dev commercial ISO to fileserver
|
|
run: |
|
|
scp "/home/user/radiantwave/${FILENAME}" \
|
|
radiantwave-infra:/mnt/infrastructure_data/files/images/
|
|
- name: Cleanup
|
|
run: rm -f "/home/user/radiantwave/${FILENAME}"
|