fix: improve git clone error handling in build workflow
Some checks failed
Build and Deploy / build (push) Has been cancelled

This commit is contained in:
Unchained
2026-04-05 11:39:39 +02:00
parent 05b2c26634
commit cdbcd8424b

View File

@@ -35,8 +35,15 @@ jobs:
- -c
- |
set -e
echo "Cloning repository..."
rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true
git clone --depth 1 http://gitea:3000/unchained/manoon-headless.git /workspace
cd /workspace && echo "Building: $(git rev-parse --short HEAD)"
if [ ! -d /workspace/.git ]; then
echo "ERROR: Clone failed - .git directory not found"
exit 1
fi
cd /workspace
echo "Successfully cloned: $(git rev-parse --short HEAD)"
volumeMounts:
- name: workspace
mountPath: /workspace