Files
KioskConfig/.gitea/workflows/build-dev.yml
T

68 lines
2.5 KiB
YAML

on:
push:
branches:
- dev
jobs:
update-and-build:
runs-on: radiantwave-actions
steps:
- name: Print Environment
run: |
which nix || echo "nix not in PATH"
which node || echo "node not in PATH"
which npm || echo "npm not in PATH"
- name: Checkout
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Update radiantwave-dev
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
nix flake update radiantwave-dev
# This builds the system closure
- name: Build dev VM
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
nix build -L .#nixosConfigurations.radiantwavekiosk-dev.config.system.build.toplevel
# If the closure builds, it's valid, even if incorrect and something is wrong.
# That's why we build the ISO next, even for the dev branch, for testing
- name: Build dev ISO
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
nix build -L .#nixosConfigurations.dev-iso.config.system.build.isoImage
cp -rL result/iso/*.iso /ssd/radiantwave/build/radiantwave-kiosk-iso-dev-$(date +%Y-%m-%d_%H-%M-%S).iso
- name: Commit updated flake.lock
run: |
git config user.email "ci@radiantwavetech.com"
git config user.name "RadiantWave CI"
git remote set-url origin https://oauth2:${{ secrets.FORGEJO_TOKEN }}@gitea.radiantwavetech.com/RadiantWaveTech/KioskConfig.git
git add flake.lock
git commit -m "chore: update radiantwave-dev to latest dev" || echo "Nothing to commit"
git push
- name: Copy ISO to fileserver
run: scp result/iso/* radiantwave-infra:/mnt/infrastructure_data/files/images/
- name: Notify
if: always()
uses: https://github.com/dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: "${{ job.status == 'success' && '✅' || '❌' }} KioskConfig dev build ${{ job.status }}"
to: nclack@radiantwavetech.com
from: ci@radiantwavetech.com
body: "KioskConfig dev build ${{ job.status }} — radiantwave-dev updated and arstifacts copied to /ssd/radiantwave/build/"