feat: CI/CD builds both bundled and unbundled ISOs
Workflow builds both variants on push to main. Manual trigger lets you choose bundled, unbundled, or both. ISOs auto-copied to FileBrowser /Builds/ folder for easy download. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
08bb2c80d4
commit
059913d3dd
@ -4,44 +4,109 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
variant:
|
||||||
|
description: 'ISO variant to build'
|
||||||
|
required: false
|
||||||
|
default: 'both'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- both
|
||||||
|
- bundled
|
||||||
|
- unbundled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-iso:
|
build-backend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
run: |
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Build backend (release)
|
- name: Build backend (release)
|
||||||
run: cargo build --release --manifest-path core/Cargo.toml
|
run: |
|
||||||
|
source ~/.cargo/env 2>/dev/null || true
|
||||||
|
cargo build --release --manifest-path core/Cargo.toml
|
||||||
|
|
||||||
- name: Install backend binary
|
- name: Install backend binary
|
||||||
run: |
|
run: sudo cp core/target/release/archipelago /usr/local/bin/archipelago
|
||||||
sudo cp core/target/release/archipelago /usr/local/bin/archipelago
|
|
||||||
sudo chmod +x /usr/local/bin/archipelago
|
build-frontend:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: |
|
run: cd neode-ui && npm ci && npm run build
|
||||||
cd neode-ui
|
|
||||||
npm ci
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: Build ISO
|
build-bundled-iso:
|
||||||
|
needs: [build-backend, build-frontend]
|
||||||
|
if: ${{ github.event.inputs.variant != 'unbundled' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 45
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build backend
|
||||||
|
run: |
|
||||||
|
source ~/.cargo/env 2>/dev/null || true
|
||||||
|
cargo build --release --manifest-path core/Cargo.toml
|
||||||
|
sudo cp core/target/release/archipelago /usr/local/bin/archipelago
|
||||||
|
|
||||||
|
- name: Build frontend
|
||||||
|
run: cd neode-ui && npm ci && npm run build
|
||||||
|
|
||||||
|
- name: Build bundled ISO
|
||||||
run: |
|
run: |
|
||||||
cd image-recipe
|
cd image-recipe
|
||||||
sudo DEV_SERVER=localhost BUILD_FROM_SOURCE=0 ./build-auto-installer-iso.sh
|
sudo DEV_SERVER=localhost BUILD_FROM_SOURCE=0 ./build-auto-installer-iso.sh
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
- name: Upload ISO artifact
|
- name: Copy to Builds folder
|
||||||
uses: actions/upload-artifact@v3
|
run: |
|
||||||
with:
|
ISO=$(ls image-recipe/results/archipelago-installer-*.iso 2>/dev/null | head -1)
|
||||||
name: archipelago-iso
|
if [ -n "$ISO" ]; then
|
||||||
path: image-recipe/results/*.iso
|
DATE=$(date +%Y%m%d-%H%M)
|
||||||
retention-days: 30
|
sudo cp "$ISO" "/var/lib/archipelago/filebrowser/Builds/archipelago-bundled-${DATE}.iso"
|
||||||
|
sudo chown 1000:1000 "/var/lib/archipelago/filebrowser/Builds/archipelago-bundled-${DATE}.iso"
|
||||||
|
echo "ISO copied to Builds: archipelago-bundled-${DATE}.iso"
|
||||||
|
fi
|
||||||
|
|
||||||
|
build-unbundled-iso:
|
||||||
|
needs: [build-backend, build-frontend]
|
||||||
|
if: ${{ github.event.inputs.variant != 'bundled' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build backend
|
||||||
|
run: |
|
||||||
|
source ~/.cargo/env 2>/dev/null || true
|
||||||
|
cargo build --release --manifest-path core/Cargo.toml
|
||||||
|
sudo cp core/target/release/archipelago /usr/local/bin/archipelago
|
||||||
|
|
||||||
|
- name: Build frontend
|
||||||
|
run: cd neode-ui && npm ci && npm run build
|
||||||
|
|
||||||
|
- name: Build unbundled ISO
|
||||||
|
run: |
|
||||||
|
cd image-recipe
|
||||||
|
sudo UNBUNDLED=1 DEV_SERVER=localhost BUILD_FROM_SOURCE=0 ./build-auto-installer-iso.sh
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
|
- name: Copy to Builds folder
|
||||||
|
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 copied to Builds: archipelago-unbundled-${DATE}.iso"
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user