ci: clean all sibling dirs before copying to fix stale table defs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m20s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m20s
Previous runs left self-copies (e.g. events/events/) that caused 'Table already defined' errors. Split into two loops: first rm -rf all sibling dirs, then copy only non-self siblings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,10 +39,13 @@ jobs:
|
|||||||
git fetch origin ${{ github.ref_name }}
|
git fetch origin ${{ github.ref_name }}
|
||||||
git reset --hard origin/${{ github.ref_name }}
|
git reset --hard origin/${{ github.ref_name }}
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
# Copy sibling app models for cross-domain imports (skip self to avoid duplicate table defs)
|
# Clean ALL sibling dirs (including stale self-copies from previous runs)
|
||||||
|
for sibling in blog market cart events; do
|
||||||
|
rm -rf \$sibling
|
||||||
|
done
|
||||||
|
# Copy non-self sibling models for cross-domain imports
|
||||||
for sibling in blog market cart events; do
|
for sibling in blog market cart events; do
|
||||||
[ \"\$sibling\" = \"${{ env.IMAGE }}\" ] && continue
|
[ \"\$sibling\" = \"${{ env.IMAGE }}\" ] && continue
|
||||||
rm -rf \$sibling/__init__.py \$sibling/models
|
|
||||||
repo=/root/rose-ash/\$sibling
|
repo=/root/rose-ash/\$sibling
|
||||||
if [ -d \$repo/.git ]; then
|
if [ -d \$repo/.git ]; then
|
||||||
git -C \$repo fetch origin ${{ github.ref_name }} 2>/dev/null || true
|
git -C \$repo fetch origin ${{ github.ref_name }} 2>/dev/null || true
|
||||||
|
|||||||
Reference in New Issue
Block a user