Another attempt to fix the CICD
Signed-off-by: copilotcoder <copilotcoder@darkhelm.org>
This commit is contained in:
@@ -131,10 +131,25 @@ RUN --mount=type=secret,id=ssh_private_key \
|
||||
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config && \
|
||||
chmod 600 ~/.ssh/config && \
|
||||
ssh-keyscan -p 2222 kankali.darkhelm.lan >> ~/.ssh/known_hosts 2>/dev/null && \
|
||||
# Keep the secret-mounted step minimal to avoid BuildKit session timeouts.
|
||||
GIT_SSH_COMMAND="ssh -F ~/.ssh/config" \
|
||||
git clone --depth 1 --branch main \
|
||||
ssh://git@kankali.darkhelm.lan:2222/DarkHelm.org/plex-playlist.git /tmp/fullrepo && \
|
||||
clone_ok=false && \
|
||||
for i in 1 2 3; do \
|
||||
echo "Clone attempt ${i}/3 from Gitea..." && \
|
||||
if GIT_SSH_COMMAND="ssh -F ~/.ssh/config" \
|
||||
git clone --depth 1 --branch main \
|
||||
ssh://git@kankali.darkhelm.lan:2222/DarkHelm.org/plex-playlist.git /tmp/fullrepo; then \
|
||||
clone_ok=true && \
|
||||
break; \
|
||||
fi && \
|
||||
if [ "${i}" -lt 3 ]; then \
|
||||
echo "⚠ Clone attempt ${i} failed, retrying in 5 seconds..." && \
|
||||
rm -rf /tmp/fullrepo && \
|
||||
sleep 5; \
|
||||
fi; \
|
||||
done && \
|
||||
if [ "${clone_ok}" != "true" ]; then \
|
||||
echo "❌ Failed to clone repository from Gitea after 3 attempts" && \
|
||||
exit 1; \
|
||||
fi && \
|
||||
if [ -n "$GITHUB_SHA" ]; then \
|
||||
cd /tmp/fullrepo && git checkout "$GITHUB_SHA" 2>/dev/null || echo "Using main branch HEAD"; \
|
||||
fi && \
|
||||
|
||||
Reference in New Issue
Block a user