Fix CI local copy - use git clone or selective copy to avoid workspace pollution
Some checks failed
package-tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk python_version:3.13]) (push) Failing after 1s
package-tests / test-python-packages (map[name:aitbc-cli path:. python_version:3.13]) (push) Failing after 19s
package-tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core python_version:3.13]) (push) Failing after 8s
package-tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto python_version:3.13]) (push) Failing after 6s
package-tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk python_version:3.13]) (push) Successful in 10s
security-scanning / audit (push) Successful in 11s
package-tests / test-javascript-packages (map[name:aitbc-sdk node_version:24 path:packages/js/aitbc-sdk]) (push) Successful in 20s
package-tests / cross-language-compatibility (push) Has been skipped
package-tests / package-integration-tests (push) Has been skipped

This commit is contained in:
aitbc1
2026-03-28 12:30:39 +01:00
parent 6ca8ae2675
commit aa5f0d0341

View File

@@ -149,7 +149,14 @@ jobs:
if [[ -d "/opt/aitbc/.git" ]]; then
echo "Using local repository copy..."
rm -rf repo
if cp -r /opt/aitbc repo 2>/dev/null; then
# Use git archive or copy specific directories to avoid workspace pollution
if git clone --depth 1 file:///opt/aitbc repo 2>/dev/null; then
echo "✅ Local git clone successful"
cd repo
git remote set-url origin "$REPO_URL" 2>/dev/null || true
cd ..
elif cp -r /opt/aitbc/.git repo/ 2>/dev/null && cp -r /opt/aitbc/packages repo/ 2>/dev/null && cp -r /opt/aitbc/cli repo/ 2>/dev/null && cp -r /opt/aitbc/apps repo/ 2>/dev/null && cp /opt/aitbc/pyproject.toml repo/ 2>/dev/null && cp /opt/aitbc/setup.py repo/ 2>/dev/null; then
echo "✅ Selective copy successful"
cd repo
git remote set-url origin "$REPO_URL" 2>/dev/null || true
cd ..