All checks were successful
Build Archipelago ISO / build-iso (push) Successful in 18m38s
sudo doesn't inherit env vars. Use absolute path and pass it explicitly so the ISO build finds the freshly built binary instead of falling through to podman build from source. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
name: Build Archipelago ISO
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-iso:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Build backend
|
|
run: |
|
|
source $HOME/.cargo/env 2>/dev/null || true
|
|
cargo build --release --manifest-path core/Cargo.toml
|
|
|
|
- name: Build frontend
|
|
run: cd neode-ui && npm ci && npm run build
|
|
|
|
- name: Cache Debian Live ISO
|
|
run: |
|
|
WORK_DIR="image-recipe/build/auto-installer"
|
|
mkdir -p "$WORK_DIR"
|
|
CACHED="/home/archipelago/archy/image-recipe/build/auto-installer/debian-live-installer.iso"
|
|
if [ -f "$CACHED" ] && [ ! -f "$WORK_DIR/debian-live-installer.iso" ]; then
|
|
cp "$CACHED" "$WORK_DIR/debian-live-installer.iso"
|
|
echo "Cached Debian Live ISO copied ($(du -h "$WORK_DIR/debian-live-installer.iso" | cut -f1))"
|
|
fi
|
|
|
|
- name: Build unbundled ISO
|
|
run: |
|
|
cd image-recipe
|
|
export ARCHIPELAGO_BIN="$(pwd)/../core/target/release/archipelago"
|
|
ls -la "$ARCHIPELAGO_BIN" || echo "WARNING: binary not found"
|
|
sudo -E UNBUNDLED=1 DEV_SERVER=localhost BUILD_FROM_SOURCE=0 \
|
|
ARCHIPELAGO_BIN="$ARCHIPELAGO_BIN" \
|
|
./build-auto-installer-iso.sh
|
|
|
|
- name: Copy to Builds
|
|
run: |
|
|
ISO=$(ls image-recipe/results/archipelago-installer-unbundled-*.iso 2>/dev/null | head -1)
|
|
if [ -n "$ISO" ]; then
|
|
DATE=$(date +%Y%m%d-%H%M)
|
|
sudo cp "$ISO" "/var/lib/archipelago/filebrowser/Builds/archipelago-unbundled-${DATE}.iso"
|
|
sudo chown 1000:1000 "/var/lib/archipelago/filebrowser/Builds/archipelago-unbundled-${DATE}.iso"
|
|
echo "ISO: archipelago-unbundled-${DATE}.iso"
|
|
fi
|
|
|
|
- name: Fix workspace permissions
|
|
if: always()
|
|
run: sudo chown -R $(id -u):$(id -g) . 2>/dev/null || true
|