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) <noreply@anthropic.com>
This commit is contained in:
parent
aa957d0e87
commit
fea256c5a8
@ -17,17 +17,16 @@ jobs:
|
|||||||
clean: true
|
clean: true
|
||||||
continue-on-error: 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: |
|
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
|
cd /home/archipelago/archy && git pull origin main 2>/dev/null || true
|
||||||
# If checkout failed (no .git), copy from local repo
|
# Always sync from local repo to ensure latest code
|
||||||
if [ ! -d ".git" ] || [ ! -f "core/archipelago/Cargo.toml" ]; then
|
echo "Syncing workspace from local repo..."
|
||||||
echo "Checkout failed — syncing from local repo"
|
rsync -a --delete --exclude='.git' --exclude='target/' --exclude='node_modules/' \
|
||||||
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
|
||||||
/home/archipelago/archy/ ./ 2>/dev/null || cp -a /home/archipelago/archy/* . 2>/dev/null
|
|
||||||
fi
|
|
||||||
echo "Source version: $(grep '^version' core/archipelago/Cargo.toml 2>/dev/null)"
|
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
|
- name: Build backend
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user