Fix CI repo cleanup - cd to root and ignore rm errors
Some checks failed
package-tests / test-python-packages (map[name:aitbc-cli path:. python_version:3.13]) (push) Failing after 13s
package-tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk python_version:3.13]) (push) Failing after 15s
package-tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core python_version:3.13]) (push) Failing after 2s
package-tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto python_version:3.13]) (push) Failing after 7s
package-tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk python_version:3.13]) (push) Successful in 10s
package-tests / test-javascript-packages (map[name:aitbc-sdk node_version:24 path:packages/js/aitbc-sdk]) (push) Successful in 11s
package-tests / cross-language-compatibility (push) Has been skipped
package-tests / package-integration-tests (push) Has been skipped
security-scanning / audit (push) Successful in 9s

This commit is contained in:
aitbc1
2026-03-28 12:33:23 +01:00
parent 03fcce75b3
commit 3e4a66e77c

View File

@@ -140,7 +140,8 @@ jobs:
echo "❌ Standard clone failed, trying alternatives..." echo "❌ Standard clone failed, trying alternatives..."
# Try shallow clone # Try shallow clone
rm -rf repo cd / || true
rm -rf repo 2>/dev/null || true
echo "Attempting shallow clone..." echo "Attempting shallow clone..."
if git clone --depth 1 "$REPO_URL" repo 2>/dev/null; then if git clone --depth 1 "$REPO_URL" repo 2>/dev/null; then
echo "✅ Shallow clone successful" echo "✅ Shallow clone successful"
@@ -150,7 +151,8 @@ jobs:
# Try local repository copy # Try local repository copy
if [[ -d "/opt/aitbc/.git" ]]; then if [[ -d "/opt/aitbc/.git" ]]; then
echo "Using local repository copy..." echo "Using local repository copy..."
rm -rf repo cd / || true
rm -rf repo 2>/dev/null || true
# Use git archive or copy specific directories to avoid workspace pollution # Use git archive or copy specific directories to avoid workspace pollution
if git clone --depth 1 file:///opt/aitbc repo 2>/dev/null; then if git clone --depth 1 file:///opt/aitbc repo 2>/dev/null; then
echo "✅ Local git clone successful" echo "✅ Local git clone successful"