archy/.gitea/workflows/build-iso.yml
Dorian 5a850275b7 fix: CI checkout uses manual git clone instead of missing action
The actions/checkout@v4 action was 404 on git.tx1138.com causing
instant build failures. Use manual git clone for reliability with
host-mode runner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:16:13 +00:00

49 lines
1.6 KiB
YAML

name: Build Archipelago ISO
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-iso:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
run: |
WORKSPACE="${GITHUB_WORKSPACE:-$(pwd)}"
cd "$WORKSPACE"
if [ -d .git ]; then
git fetch origin "${GITHUB_REF_NAME:-main}" --depth 1
git checkout FETCH_HEAD
else
git clone --depth 1 --branch "${GITHUB_REF_NAME:-main}" \
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" "$WORKSPACE"
fi
echo "Checked out $(git rev-parse --short HEAD) on ${GITHUB_REF_NAME:-main}"
- name: Build backend
run: |
source $HOME/.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
- 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