68 lines
2.8 KiB
YAML
68 lines
2.8 KiB
YAML
# This workflow generates dev-iso any time RadiantWave is updated.
|
|
# When RadiantWave recieves a PR, a workflow is triggered that builds
|
|
# the application. If that succeeds, then this workflow is triggered
|
|
# to build the dev-iso for testing on a dev machine. The iso image is
|
|
# spit into /ssd/radiantwave/builds/ and is timestamped.
|
|
#
|
|
# This action is not meant to be run any time code is pushed to
|
|
# KioskConfig, instead, it is strictly a "response" action.
|
|
#
|
|
# Remember: KioskConfig only has the main branch, because
|
|
# the split between production and development happens
|
|
# at the system closure level, not at the branch level of
|
|
# this repository.
|
|
on:
|
|
workflow_dispatch:
|
|
repository_dispatch:
|
|
types:
|
|
- radiantwave-dev-built
|
|
jobs:
|
|
update-and-build:
|
|
runs-on: neils-server-runner
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
token: ${{ secrets.TOKEN }}
|
|
|
|
- name: Update rhemawave-dev
|
|
run: |
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
nix flake update rhemawave-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.rhemawavekiosk-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)
|
|
|
|
- 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 }}@codeberg.org/RhemaWave-Technologies/KioskConfig.git
|
|
git add flake.lock
|
|
git commit -m "chore: update rhemawave-dev to latest dev" || echo "Nothing to commit"
|
|
git push
|
|
|
|
- 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: cnclack@pm.me
|
|
from: ci@radiantwavetech.com
|
|
body: "KioskConfig dev build ${{ job.status }} — rhemawave-dev updated and arstifacts copied to /ssd/radiantwave/build/"
|