From ff256288e0f48e0fcec2bac22ae2ccd2e814d86c Mon Sep 17 00:00:00 2001 From: NeilClack Date: Sun, 2 Aug 2026 01:39:34 -0500 Subject: [PATCH] Update workflow to be more verbose --- .gitea/workflows/build-dev.yml | 37 ++++----- .gitea/workflows/build-prod.yml | 141 ++++++++++++++++++++++---------- .sops.yaml | 7 -- README.md | 2 - 4 files changed, 116 insertions(+), 71 deletions(-) delete mode 100644 .sops.yaml delete mode 100644 README.md diff --git a/.gitea/workflows/build-dev.yml b/.gitea/workflows/build-dev.yml index f062c4d..5acc73e 100644 --- a/.gitea/workflows/build-dev.yml +++ b/.gitea/workflows/build-dev.yml @@ -2,9 +2,11 @@ on: push: branches: - dev + jobs: update-and-build: runs-on: radiantwave-actions + steps: # - name: Print Environment # run: | @@ -45,27 +47,29 @@ jobs: . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh nix flake update radiantwave-dev + - name: Prepare output directory + run: mkdir -p /home/runner/radiantwave + - name: Build dev 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 - mkdir -p /home/runner/radiantwave - - ISO_NAME="radiantwave-kiosk-iso-dev-$(date +%Y-%m-%d_%H-%M-%S).iso" - ISO_PATH="/home/runner/radiantwave/${ISO_NAME}" - - cp -L result/iso/*.iso "${ISO_PATH}" - - echo "ISO_NAME=${ISO_NAME}" >> "$GITHUB_ENV" - echo "ISO_PATH=${ISO_PATH}" >> "$GITHUB_ENV" - - - name: Copy ISO to fileserver + - name: Rename dev ISO run: | - scp "${ISO_PATH}" \ - nclack@157.245.124.103:/mnt/infrastructure_data/files/images/"${ISO_NAME}" + ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S) + FILENAME="radiantwave-kiosk-iso-dev-${ISO_DATE}.iso" + cp -L result/iso/*.iso "/home/runner/radiantwave/${FILENAME}" + echo "DEV_ISO_FILENAME=${FILENAME}" >> "$GITHUB_ENV" + + - name: Copy dev ISO to fileserver + run: | + scp "/home/runner/radiantwave/${DEV_ISO_FILENAME}" \ + nclack@157.245.124.103:/mnt/infrastructure_data/files/images/ + + - name: Cleanup dev ISO + run: rm -f "/home/runner/radiantwave/${DEV_ISO_FILENAME}" - name: Commit updated flake.lock run: | @@ -75,8 +79,3 @@ jobs: git add flake.lock git commit -m "chore: update radiantwave-dev to latest dev" || echo "Nothing to commit" git push - - - name: Cleanup - run: | - rm -rf /home/runner/radiantwave/* - echo "Deleted all files in /home/runner/radiantwave/" diff --git a/.gitea/workflows/build-prod.yml b/.gitea/workflows/build-prod.yml index 92b3aa0..c779db0 100644 --- a/.gitea/workflows/build-prod.yml +++ b/.gitea/workflows/build-prod.yml @@ -11,46 +11,106 @@ jobs: - name: Checkout uses: actions/checkout@v6 - - name: Configure git auth for Gitea - run: | - git config --global url."https://oauth2:${{ secrets.GIT_TOKEN }}@gitea.radiantwavetech.com/".insteadOf "https://gitea.radiantwavetech.com/" + # - name: Configure git auth for Gitea + # run: | + # git config --global url."https://oauth2:${{ secrets.GIT_TOKEN }}@gitea.radiantwavetech.com/".insteadOf "https://gitea.radiantwavetech.com/" - name: Update radiantwave run: | . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh nix flake update radiantwave - - name: Build ISO and image artifacts + - name: Prepare output directory + run: mkdir -p /home/runner/radiantwave + + # --- Kiosk ISO --- + - name: Build kiosk ISO run: | export NIXPKGS_ALLOW_UNFREE=1 . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh - - mkdir -p /home/runner/radiantwave - - ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S) - nix build -L --impure .#nixosConfigurations.kiosk-iso.config.system.build.isoImage - cp -L result/iso/*.iso \ - "/home/runner/radiantwave/radiantwave-iso-${ISO_DATE}.iso" - nix build -L --impure .#nixosConfigurations.android-iso.config.system.build.isoImage - cp -L result/iso/*.iso \ - "/home/runner/radiantwave/radiantwave-android-iso-${ISO_DATE}.iso" - - nix build -L --impure .#nixosConfigurations.commercial-iso.config.system.build.isoImage - cp -L result/iso/*.iso \ - "/home/runner/radiantwave/radiantwave-commercial-iso-${ISO_DATE}.iso" - - # Disable Raspberry Pi builds for speed, for now - # nix build -L --impure .#nixosConfigurations.radiantwavekiosk-rpi.config.system.build.sdImage - # cp -L result/sd-image/*.img.zst \ - # "/home/runner/radiantwave/radiantwave-rpi-${ISO_DATE}.img.zst" - - - name: Copy outputs to fileserver + - name: Rename kiosk ISO run: | - scp /home/runner/radiantwave/* \ + ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S) + FILENAME="radiantwave-iso-${ISO_DATE}.iso" + cp -L result/iso/*.iso "/home/runner/radiantwave/${FILENAME}" + echo "KIOSK_ISO_FILENAME=${FILENAME}" >> "$GITHUB_ENV" + + - name: Copy kiosk ISO to fileserver + run: | + scp "/home/runner/radiantwave/${KIOSK_ISO_FILENAME}" \ nclack@157.245.124.103:/mnt/infrastructure_data/files/images/ + - name: Cleanup kiosk ISO + run: rm -f "/home/runner/radiantwave/${KIOSK_ISO_FILENAME}" + + # --- Android Kiosk ISO --- + - 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/runner/radiantwave/${FILENAME}" + echo "ANDROID_ISO_FILENAME=${FILENAME}" >> "$GITHUB_ENV" + + - name: Copy android kiosk ISO to fileserver + run: | + scp "/home/runner/radiantwave/${ANDROID_ISO_FILENAME}" \ + nclack@157.245.124.103:/mnt/infrastructure_data/files/images/ + + - name: Cleanup android kiosk ISO + run: rm -f "/home/runner/radiantwave/${ANDROID_ISO_FILENAME}" + + # --- Commercial Kiosk ISO --- + - name: Build commercial kiosk 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 commercial kiosk ISO + run: | + ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S) + FILENAME="radiantwave-commercial-iso-${ISO_DATE}.iso" + cp -L result/iso/*.iso "/home/runner/radiantwave/${FILENAME}" + echo "COMMERCIAL_ISO_FILENAME=${FILENAME}" >> "$GITHUB_ENV" + + - name: Copy commercial kiosk ISO to fileserver + run: | + scp "/home/runner/radiantwave/${COMMERCIAL_ISO_FILENAME}" \ + nclack@157.245.124.103:/mnt/infrastructure_data/files/images/ + + - name: Cleanup commercial kiosk ISO + run: rm -f "/home/runner/radiantwave/${COMMERCIAL_ISO_FILENAME}" + + # --- Raspberry Pi image (disabled for speed, for now) --- + # - 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/runner/radiantwave/${FILENAME}" + # echo "RPI_IMAGE_FILENAME=${FILENAME}" >> "$GITHUB_ENV" + # + # - name: Copy Raspberry Pi image to fileserver + # run: | + # scp "/home/runner/radiantwave/${RPI_IMAGE_FILENAME}" \ + # nclack@157.245.124.103:/mnt/infrastructure_data/files/images/ + # + # - name: Cleanup Raspberry Pi image + # run: rm -f "/home/runner/radiantwave/${RPI_IMAGE_FILENAME}" + - name: Commit updated flake.lock run: | git config user.email "ci@radiantwavetech.com" @@ -61,20 +121,15 @@ jobs: git commit -m "chore: update radiantwave to latest main" || echo "Nothing to commit" git push - - name: Cleanup - run: | - rm -rf /home/runner/radiantwave/* - echo "Deleted all files in /home/runner/radiantwave/" - - - name: Notify - if: always() - uses: https://github.com/dawidd6/action-send-mail@v3 - with: - server_address: smtp.gmail.com - server_port: 587 - username: ${{ secrets.MAIL_USERNAME }} - password: ${{ secrets.MAIL_PASSWORD }} - subject: "${{ job.status == 'success' && '✅' || '❌' }} KioskConfig main build ${{ job.status }}" - to: nclack@radiantwavetech.com - from: ci@radiantwavetech.com - body: "KioskConfig main build ${{ job.status }} — radiantwave updated and artifacts copied." + # - name: Notify + # if: always() + # uses: https://github.com/dawidd6/action-send-mail@v3 + # with: + # server_address: smtp.gmail.com + # server_port: 587 + # username: ${{ secrets.MAIL_USERNAME }} + # password: ${{ secrets.MAIL_PASSWORD }} + # subject: "${{ job.status == 'success' && '✅' || '❌' }} KioskConfig main build ${{ job.status }}" + # to: nclack@radiantwavetech.com + # from: ci@radiantwavetech.com + # body: "KioskConfig main build ${{ job.status }} — radiantwave updated and artifacts copied." diff --git a/.sops.yaml b/.sops.yaml deleted file mode 100644 index b6b0d12..0000000 --- a/.sops.yaml +++ /dev/null @@ -1,7 +0,0 @@ -keys: - - &primary age1t2wpzv5rj8uqcfhev3zw4zkhckayumfahjvqwamjrn9724u6vf6qp2ayld -creation_rules: - - path_regex: secrets.yaml$ - key_groups: - - age: - - *primary diff --git a/README.md b/README.md deleted file mode 100644 index f03c859..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# kioskconfig -Radiant Wave Kiosk configurations via NixOS