45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: Build Dev ISO
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-dev-iso:
|
|
runs-on: build-server
|
|
|
|
steps:
|
|
- name: Checkout
|
|
run: git clone --depth 1 --branch "${GITEA_REF_NAME}" ssh://git@gitea.radiantwavetech.com:2222/RadiantWaveTech/KioskConfig.git .
|
|
|
|
# flake.lock is updated manually (committing an updated lock is the
|
|
# release trigger); CI only builds what is checked in.
|
|
|
|
- name: Prepare output directory
|
|
run: mkdir -p /home/user/radiantwave
|
|
|
|
# --- Kiosk ISO ---
|
|
- name: Build kiosk ISO
|
|
run: |
|
|
export NIXPKGS_ALLOW_UNFREE=1
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
nix build -L --impure .#nixosConfigurations.dev-iso.config.system.build.isoImage
|
|
|
|
- name: Rename kiosk ISO
|
|
run: |
|
|
ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
|
FILENAME="radiantwave-kiosk-dev-iso-${ISO_DATE}.iso"
|
|
cp -L result/iso/*.iso "/home/user/radiantwave/${FILENAME}"
|
|
echo "KIOSK_ISO_FILENAME=${FILENAME}" >> "$GITHUB_ENV"
|
|
|
|
- name: Move old dev images to archive
|
|
run: |
|
|
ssh nclack@157.245.124.103 'find /mnt/infrastructure_data/files/images -maxdepth 1 -name "radiantwave-kiosk-dev*" -exec mv {} /mnt/infrastructure_data/files/images/archives/ ;'
|
|
|
|
- name: Copy kiosk ISO to fileserver
|
|
run: |
|
|
scp "/home/user/radiantwave/${KIOSK_ISO_FILENAME}" \
|
|
radiantwave-infra:/mnt/infrastructure_data/files/images/
|
|
|
|
- name: Cleanup kiosk ISO
|
|
run: rm -f "/home/user/radiantwave/${KIOSK_ISO_FILENAME}"
|