CI: copy sibling app models into build context for cross-domain imports
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m46s

Phases 1-3 split models by domain ownership, but cross-app imports
still exist (e.g. cart imports market.models.CartItem). In Docker
each app only has its own code. The CI step now copies sibling app
model packages into the build context before docker build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-11 15:01:58 +00:00
parent 908f92464e
commit 029b02ff18

View File

@@ -39,6 +39,15 @@ jobs:
git fetch origin ${{ github.ref_name }}
git reset --hard origin/${{ github.ref_name }}
git submodule update --init --recursive
# Copy sibling app models for cross-domain imports
for sibling in blog market cart events; do
rm -rf \$sibling/__init__.py \$sibling/models
if [ -d /root/rose-ash/\$sibling/models ]; then
mkdir -p \$sibling
cp /root/rose-ash/\$sibling/__init__.py \$sibling/ 2>/dev/null || touch \$sibling/__init__.py
cp -r /root/rose-ash/\$sibling/models \$sibling/models
fi
done
"
- name: Build and push image