From fea256c5a8b841cf531976aecbc01113241ec7b5 Mon Sep 17 00:00:00 2001 From: Dorian Date: Thu, 2 Apr 2026 19:17:40 +0100 Subject: [PATCH] fix: CI always syncs from local repo (checkout token unreliable) The actions/checkout@v4 step fails with stale Gitea token but leaves a cached .git dir, preventing the fallback from triggering. Now we always rsync from ~/archy/ which is kept up-to-date via git pull. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build-iso.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build-iso.yml b/.gitea/workflows/build-iso.yml index f15037d4..2ef977c4 100644 --- a/.gitea/workflows/build-iso.yml +++ b/.gitea/workflows/build-iso.yml @@ -17,17 +17,16 @@ jobs: clean: true continue-on-error: true - - name: Sync from local repo (fallback when checkout fails) + - name: Sync from local repo (always — checkout token is unreliable) run: | - # Always pull latest in local repo so fallback is current + # Pull latest into local repo cd /home/archipelago/archy && git pull origin main 2>/dev/null || true - # If checkout failed (no .git), copy from local repo - if [ ! -d ".git" ] || [ ! -f "core/archipelago/Cargo.toml" ]; then - echo "Checkout failed — syncing from local repo" - rsync -a --delete --exclude='.git' --exclude='target/' --exclude='node_modules/' \ - /home/archipelago/archy/ ./ 2>/dev/null || cp -a /home/archipelago/archy/* . 2>/dev/null - fi + # Always sync from local repo to ensure latest code + echo "Syncing workspace from local repo..." + rsync -a --delete --exclude='.git' --exclude='target/' --exclude='node_modules/' \ + /home/archipelago/archy/ ./ 2>/dev/null || cp -a /home/archipelago/archy/* . 2>/dev/null || true echo "Source version: $(grep '^version' core/archipelago/Cargo.toml 2>/dev/null)" + echo "Latest commit: $(cd /home/archipelago/archy && git log --oneline -1 2>/dev/null)" - name: Build backend run: |