57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-and-build:
|
|
runs-on: build-server
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://github.com/actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GIT_TOKEN }}
|
|
|
|
- name: Update radiantwave-dev
|
|
run: |
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
nix flake update radiantwave-dev
|
|
|
|
- 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: 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}"
|
|
|
|
- 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.GIT_TOKEN }}@gitea.radiantwavetech.com/RadiantWaveTech/kioskconfig.git
|
|
|
|
git add flake.lock
|
|
git commit -m "chore: update radiantwave-dev to latest" || echo "Nothing to commit"
|
|
git push
|