Build Dev ISO / build-dev-iso (push) Failing after 3m18s
The inline find -exec broke through the double shell hop (the remote shell consumed the ; separator). The script pipes its payload to remote bash via stdin, tolerates zero matches, and fails loudly on missing directories or failed moves.
43 lines
1.7 KiB
YAML
43 lines
1.7 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
NIX_CONFIG: |
|
|
extra-substituters = https://attic.radiantwavetech.com/radiantwave https://nixos-raspberrypi.cachix.org
|
|
extra-trusted-public-keys = radiantwave:QADrjpBWJssTZ3KmiZtcWEf4uAm66oOlHmtQI3jkrgA= nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI=
|
|
|
|
jobs:
|
|
build-rpi:
|
|
runs-on: build-server
|
|
|
|
steps:
|
|
- name: Checkout
|
|
run: git clone --depth 1 ssh://git@gitea.radiantwavetech.com:2222/RadiantWaveTech/KioskConfig.git .
|
|
|
|
- name: Prepare output directory
|
|
run: mkdir -p /home/user/radiantwave
|
|
|
|
- name: Build Raspberry Pi image
|
|
run: |
|
|
export NIXPKGS_ALLOW_UNFREE=1
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
nix build -L --impure .#nixosConfigurations.radiantwavekiosk-rpi.config.system.build.sdImage
|
|
|
|
- name: Rename Raspberry Pi image
|
|
run: |
|
|
ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
|
FILENAME="radiantwave-rpi-${ISO_DATE}.img.zst"
|
|
cp -L result/sd-image/*.img.zst "/home/user/radiantwave/${FILENAME}"
|
|
echo "RPI_IMAGE_FILENAME=${FILENAME}" >> "$GITHUB_ENV"
|
|
|
|
- name: Move old Raspberry Pi images to archive
|
|
run: tools/archive-images.sh nclack@157.245.124.103 /mnt/infrastructure_data/files/images /mnt/infrastructure_data/files/images/archives 'radiantwave-rpi*'
|
|
|
|
- name: Copy Raspberry Pi image to fileserver
|
|
run: |
|
|
scp "/home/user/radiantwave/${RPI_IMAGE_FILENAME}" \
|
|
radiantwave-infra:/mnt/infrastructure_data/files/images/
|
|
|
|
- name: Cleanup Raspberry Pi image
|
|
run: rm -f "/home/user/radiantwave/${RPI_IMAGE_FILENAME}"
|