fix: CI don't replace live binary, pass build path to ISO script
Some checks failed
Build Archipelago ISO / build-iso (push) Has been cancelled

Remove the cp to /usr/local/bin that caused 'Text file busy'.
The ISO build script now accepts ARCHIPELAGO_BIN env var to find
the freshly built binary instead of requiring it installed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-26 15:28:43 +00:00
parent 9aaf8d4b95
commit 1d9fe06f97
2 changed files with 8 additions and 13 deletions

View File

@@ -19,22 +19,16 @@ jobs:
run: |
source $HOME/.cargo/env 2>/dev/null || true
cargo build --release --manifest-path core/Cargo.toml
sudo rm -f /usr/local/bin/archipelago
sudo cp core/target/release/archipelago /usr/local/bin/archipelago
sudo systemctl restart archipelago 2>/dev/null || true
- name: Build frontend
run: |
echo "PWD: $(pwd)"
ls -la neode-ui/package.json || echo "neode-ui/package.json NOT FOUND"
cd neode-ui
npm ci
npm run build
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
sudo UNBUNDLED=1 DEV_SERVER=localhost BUILD_FROM_SOURCE=0 \
ARCHIPELAGO_BIN=../core/target/release/archipelago \
./build-auto-installer-iso.sh
- name: Copy to Builds
run: |

View File

@@ -508,9 +508,10 @@ fi
# Try to get from live server first (unless BUILD_FROM_SOURCE=1)
BACKEND_CAPTURED=0
if [ "$BUILD_FROM_SOURCE" != "1" ]; then
# Direct copy from local filesystem (when running on target with sudo)
if [ -f "/usr/local/bin/archipelago" ]; then
cp "/usr/local/bin/archipelago" "$ARCH_DIR/bin/archipelago"
# Direct copy from ARCHIPELAGO_BIN env, local install, or remote
local BIN="${ARCHIPELAGO_BIN:-/usr/local/bin/archipelago}"
if [ -f "$BIN" ]; then
cp "$BIN" "$ARCH_DIR/bin/archipelago"
chmod +x "$ARCH_DIR/bin/archipelago"
echo " ✅ Backend captured from local system ($(du -h "$ARCH_DIR/bin/archipelago" | cut -f1))"
BACKEND_CAPTURED=1