UPdate build actions; copy files to server; remove notifications
This commit is contained in:
@@ -74,19 +74,6 @@ jobs:
|
|||||||
git commit -m "chore: update radiantwave-dev to latest dev" || echo "Nothing to commit"
|
git commit -m "chore: update radiantwave-dev to latest dev" || echo "Nothing to commit"
|
||||||
git push
|
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: nclack@radiantwavetech.com
|
|
||||||
from: ci@radiantwavetech.com
|
|
||||||
body: "KioskConfig dev build ${{ job.status }} — radiantwave-dev updated and arstifacts copied to /ssd/radiantwave/build/"
|
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
run: |
|
run: |
|
||||||
rm -rf /home/runner/radiantwave/*
|
rm -rf /home/runner/radiantwave/*
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-and-build:
|
update-and-build:
|
||||||
runs-on: radiantwave-actions
|
runs-on: radiantwave-actions
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@@ -18,60 +20,60 @@ jobs:
|
|||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
nix flake update radiantwave
|
nix flake update radiantwave
|
||||||
|
|
||||||
# This builds the system closure
|
- name: Build ISO and image artifacts
|
||||||
# these builds just verify all closures compile successfully before creating ISO images
|
|
||||||
# or allowing updates.
|
|
||||||
- name: Build dev VM
|
|
||||||
run: |
|
run: |
|
||||||
export NIXPKGS_ALLOW_UNFREE=1
|
export NIXPKGS_ALLOW_UNFREE=1
|
||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
nix build -L --impure .#nixosConfigurations.radiantwavekiosk.config.system.build.toplevel
|
|
||||||
nix build -L --import .#nixosConfigurations.radiantwavekiosk-android.config.system.build.toplevel
|
|
||||||
nix build -L --import .#nixosConfigurations.radiantwavekiosk-commercial.config.system.build.toplevel
|
|
||||||
|
|
||||||
# If the closure builds, it's valid, even if incorrect and something is wrong.
|
mkdir -p /home/runner/radiantwave
|
||||||
# That's why we build the ISO next, even for the dev branch, for testing
|
|
||||||
- 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.radiantwavekiosk.config.system.build.toplevel
|
|
||||||
cp -rL result/iso/*.iso /home/runner/radiantwave/radiantwave-kiosk-iso-$(date +%Y-%m-%d_%H-%M-%S).iso
|
|
||||||
|
|
||||||
nix build -L --impure .#nixosConfigurations.radiantwavekiosk-android.config.system.build.toplevel
|
ISO_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
||||||
cp -rL result/iso/*.iso /home/runner/radiantwave/radiantwave-kiosk-android-iso-$(date +%Y-%m-%d_%H-%M-%S).iso
|
|
||||||
|
|
||||||
nix build -L --impure .#nixosConfigurations.radiantwavekiosk-commercial.config.system.build.toplevel
|
nix build -L --impure .#nixosConfigurations.usb-iso.config.system.build.isoImage
|
||||||
cp -rL result/iso/*.iso /home/runner/radiantwave/radiantwave-kiosk-commercial-iso-$(date +%Y-%m-%d_%H-%M-%S).iso
|
cp -L result/iso/*.iso \
|
||||||
|
"/home/runner/radiantwave/radiantwave-kiosk-iso-${ISO_DATE}.iso"
|
||||||
|
|
||||||
|
nix build -L --impure .#nixosConfigurations.android-iso.config.system.build.isoImage
|
||||||
|
cp -L result/iso/*.iso \
|
||||||
|
"/home/runner/radiantwave/radiantwave-kiosk-android-iso-${ISO_DATE}.iso"
|
||||||
|
|
||||||
|
nix build -L --impure .#nixosConfigurations.commercial-usb-iso.config.system.build.isoImage
|
||||||
|
cp -L result/iso/*.iso \
|
||||||
|
"/home/runner/radiantwave/radiantwave-kiosk-commercial-iso-${ISO_DATE}.iso"
|
||||||
|
|
||||||
nix build -L --impure .#nixosConfigurations.radiantwavekiosk-rpi.config.system.build.sdImage
|
nix build -L --impure .#nixosConfigurations.radiantwavekiosk-rpi.config.system.build.sdImage
|
||||||
cp -rL result/images/*.zst /home/runner/radiantwave/radiantwave-kiosk-rpi-($date +%Y-%m-%d_%H-%M-%S).img.zst
|
cp -L result/sd-image/*.img.zst \
|
||||||
|
"/home/runner/radiantwave/radiantwave-kiosk-rpi-${ISO_DATE}.img.zst"
|
||||||
|
|
||||||
- name: Copy outputs to fileserver
|
- name: Copy outputs to fileserver
|
||||||
run: |
|
run: |
|
||||||
scp /home/runner/radiantwave/* nclack@157.245.124.103:/mnt/infrastructure_data/files/images/
|
scp /home/runner/radiantwave/* \
|
||||||
|
nclack@157.245.124.103:/mnt/infrastructure_data/files/images/
|
||||||
|
|
||||||
- name: Commit updated flake.lock
|
- name: Commit updated flake.lock
|
||||||
run: |
|
run: |
|
||||||
git config user.email "ci@radiantwavetech.com"
|
git config user.email "ci@radiantwavetech.com"
|
||||||
git config user.name "RadiantWave CI"
|
git config user.name "RadiantWave CI"
|
||||||
git remote set-url origin https://oauth2:${{ secrets.GIT_TOKEN }}@gitea.radiantwavetech.com/RadiantWaveTech/KioskConfig.git
|
git remote set-url origin https://oauth2:${{ secrets.GIT_TOKEN }}@gitea.radiantwavetech.com/RadiantWaveTech/kioskconfig.git
|
||||||
|
|
||||||
git add flake.lock
|
git add flake.lock
|
||||||
git commit -m "chore: update radiantwave-dev to latest dev" || echo "Nothing to commit"
|
git commit -m "chore: update radiantwave to latest main" || echo "Nothing to commit"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
- name: Copy ISO to fileserver
|
- name: Cleanup
|
||||||
run: scp result/iso/* radiantwave-infra:/mnt/infrastructure_data/files/images/
|
run: |
|
||||||
|
rm -rf /home/runner/radiantwave/*
|
||||||
|
echo "Deleted all files in /home/runner/radiantwave/"
|
||||||
|
|
||||||
- name: Notify
|
- name: Notify
|
||||||
if: always()
|
if: always()
|
||||||
uses: https://github.com/dawidd6/action-send-mail@v3
|
uses: https://github.com/dawidd6/action-send-mail@v3
|
||||||
with:
|
with:
|
||||||
server_address: smtp.gmail.com
|
server_address: smtp.gmail.com
|
||||||
server_port: 465
|
server_port: 587
|
||||||
username: ${{ secrets.MAIL_USERNAME }}
|
username: ${{ secrets.MAIL_USERNAME }}
|
||||||
password: ${{ secrets.MAIL_PASSWORD }}
|
password: ${{ secrets.MAIL_PASSWORD }}
|
||||||
subject: "${{ job.status == 'success' && '✅' || '❌' }} KioskConfig dev build ${{ job.status }}"
|
subject: "${{ job.status == 'success' && '✅' || '❌' }} KioskConfig main build ${{ job.status }}"
|
||||||
to: nclack@radiantwavetech.com
|
to: nclack@radiantwavetech.com
|
||||||
from: ci@radiantwavetech.com
|
from: ci@radiantwavetech.com
|
||||||
body: "KioskConfig dev build ${{ job.status }} — radiantwave-dev updated and arstifacts copied to /ssd/radiantwave/build/"
|
body: "KioskConfig main build ${{ job.status }} — radiantwave updated and artifacts copied."
|
||||||
|
|||||||
Reference in New Issue
Block a user