fix: improve git clone error handling in build workflow
Some checks failed
Build and Deploy / build (push) Has been cancelled
Some checks failed
Build and Deploy / build (push) Has been cancelled
This commit is contained in:
@@ -35,8 +35,15 @@ jobs:
|
|||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
set -e
|
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
|
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:
|
volumeMounts:
|
||||||
- name: workspace
|
- name: workspace
|
||||||
mountPath: /workspace
|
mountPath: /workspace
|
||||||
|
|||||||
Reference in New Issue
Block a user