The dev->main merge left the channel block in flake.nix pointing at radiantwave-dev, so prod ISOs built from main shipped the dev app (which versions itself by short git hash) and the updater polled the dev Attic manifest. Restore the channel block to main values, re-pin flake.lock to the latest radiantwave main revision, and expose channelName so the prod build workflows can fail fast if main ever resolves to the dev channel.
54 lines
1.9 KiB
YAML
54 lines
1.9 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
NIX_CONFIG: |
|
|
extra-substituters = https://attic.radiantwavetech.com/radiantwave
|
|
extra-trusted-public-keys = radiantwave:QADrjpBWJssTZ3KmiZtcWEf4uAm66oOlHmtQI3jkrgA=
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: build-server
|
|
|
|
steps:
|
|
- name: Checkout
|
|
run: git clone --depth 1 ssh://git@gitea.radiantwavetech.com:2222/RadiantWaveTech/KioskConfig.git .
|
|
|
|
- name: Guard main branch is on the production channel
|
|
run: |
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
NAME=$(nix eval --impure --raw .#channelName)
|
|
if [ "$NAME" != "radiantwave" ]; then
|
|
echo "ERROR: main branch resolves to the '$NAME' channel, expected 'radiantwave'."
|
|
echo " A dev->main merge brought a dev-pointing channel block into flake.nix."
|
|
echo " Set channel.appInput/atticRepo/gitRef back to main values before building prod ISOs."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Prepare output directory
|
|
run: mkdir -p /home/user/radiantwave
|
|
|
|
- name: Build android kiosk 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 android kiosk ISO
|
|
run: |
|
|
ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
|
FILENAME="radiantwave-android-iso-${ISO_DATE}.iso"
|
|
cp -L result/iso/*.iso "/home/user/radiantwave/${FILENAME}"
|
|
echo "ANDROID_ISO_FILENAME=${FILENAME}" >> "$GITHUB_ENV"
|
|
|
|
- name: Copy android kiosk ISO to fileserver
|
|
run: |
|
|
scp "/home/user/radiantwave/${ANDROID_ISO_FILENAME}" \
|
|
radiantwave-infra:/mnt/infrastructure_data/files/images/
|
|
|
|
- name: Cleanup android kiosk ISO
|
|
run: rm -f "/home/user/radiantwave/${ANDROID_ISO_FILENAME}"
|