fix: CI workflow only syncs from ~/archy if checkout failed
The rsync step was unconditionally overwriting the git checkout with ~/archy (which had diverged commit history), causing every CI build to use wrong code. Now only falls back to rsync if checkout didn't produce a valid workspace. Also removed --delete to prevent destroying checkout files, and updated verification checks. Root cause of CI build #373 using stale code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5456c63a08
commit
7425386312
@ -11,31 +11,33 @@ jobs:
|
|||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
id: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Sync from local repo (fast LAN fallback)
|
- name: Sync from local repo (fallback if checkout failed)
|
||||||
run: |
|
run: |
|
||||||
# actions/checkout fetches via WAN which is unreliable
|
# Only sync from ~/archy if checkout failed or workspace is empty
|
||||||
# ~/archy is kept in sync via rsync from dev machine
|
if [ -f "CLAUDE.md" ] && [ -d "core" ] && [ -d "neode-ui" ]; then
|
||||||
if [ -d "$HOME/archy/.gitea" ]; then
|
echo "Checkout succeeded — using checked-out code"
|
||||||
echo "Syncing from ~/archy (rsync'd source)..."
|
elif [ -d "$HOME/archy/core" ] && [ -d "$HOME/archy/neode-ui" ]; then
|
||||||
rsync -a --delete \
|
echo "Checkout failed — syncing from ~/archy (LAN fallback)..."
|
||||||
|
rsync -a \
|
||||||
--exclude '.git' --exclude 'node_modules' --exclude 'target' \
|
--exclude '.git' --exclude 'node_modules' --exclude 'target' \
|
||||||
--exclude 'image-recipe/build' --exclude 'image-recipe/results' \
|
--exclude 'image-recipe/build' --exclude 'image-recipe/results' \
|
||||||
--exclude 'web/dist' \
|
--exclude 'web/dist' \
|
||||||
"$HOME/archy/" ./
|
"$HOME/archy/" ./
|
||||||
echo "Synced. Latest commit msg from source:"
|
|
||||||
head -1 "$HOME/archy/.gitea/workflows/build-iso-dev.yml"
|
|
||||||
else
|
else
|
||||||
echo "No local repo at ~/archy, relying on checkout"
|
echo "ERROR: No checkout and no local fallback"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Workspace verification:"
|
echo "Workspace verification:"
|
||||||
grep 'torConnected' neode-ui/src/views/Home.vue && echo " Home.vue changes: PRESENT" || echo " Home.vue changes: MISSING"
|
[ -f "scripts/first-boot-containers.sh" ] && echo " first-boot-containers.sh: PRESENT" || echo " first-boot-containers.sh: MISSING"
|
||||||
grep 'host.containers.internal:host-gateway' scripts/first-boot-containers.sh && echo " Container DNS fix: PRESENT" || echo " Container DNS fix: MISSING"
|
grep -q 'network-alias' scripts/first-boot-containers.sh 2>/dev/null && echo " network-alias fix: PRESENT" || echo " network-alias fix: MISSING"
|
||||||
|
grep -q 'apache2-utils' image-recipe/build-auto-installer-iso.sh 2>/dev/null && echo " apache2-utils: PRESENT" || echo " apache2-utils: MISSING"
|
||||||
|
|
||||||
- name: Install ISO build dependencies
|
- name: Install ISO build dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user