From 029b02ff18e72dbe270829c15906d388ef73b8af Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 11 Feb 2026 15:01:58 +0000 Subject: [PATCH] CI: copy sibling app models into build context for cross-domain imports 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 --- .gitea/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 28dc1df..973d4f6 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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