fix(ci): mount /home/ucef/.ssh and prioritize gitea_ci_key over generic host keys

This commit is contained in:
2026-09-03 15:02:09 +02:00
parent 75611d147c
commit 748d86e71c
+2 -1
View File
@@ -132,6 +132,7 @@ jobs:
docker run --rm --net=host \ docker run --rm --net=host \
-v "$(pwd):/workspace" -w /workspace \ -v "$(pwd):/workspace" -w /workspace \
-v "/home/ucef/.ssh:/home/ucef/.ssh:ro" \
-v "/home/ubuntu/.ssh:/home/ubuntu/.ssh:ro" \ -v "/home/ubuntu/.ssh:/home/ubuntu/.ssh:ro" \
-v "/root/.ssh:/root/.ssh:ro" \ -v "/root/.ssh:/root/.ssh:ro" \
-e TARGET_HOST="${TARGET_HOST}" \ -e TARGET_HOST="${TARGET_HOST}" \
@@ -142,7 +143,7 @@ jobs:
alpine:latest sh -c ' alpine:latest sh -c '
apk add --no-cache openssh-client rsync && \ apk add --no-cache openssh-client rsync && \
FOUND_KEY="" && \ FOUND_KEY="" && \
for k in /home/ubuntu/.ssh/gitea_ci_key /root/.ssh/gitea_ci_key /home/ubuntu/.ssh/id_ed25519 /root/.ssh/id_ed25519 /home/ubuntu/.ssh/id_rsa /root/.ssh/id_rsa; do \ for k in /home/ucef/.ssh/gitea_ci_key /home/ubuntu/.ssh/gitea_ci_key /root/.ssh/gitea_ci_key /home/ucef/.ssh/id_ed25519 /home/ubuntu/.ssh/id_ed25519 /root/.ssh/id_ed25519 /home/ucef/.ssh/id_rsa /home/ubuntu/.ssh/id_rsa /root/.ssh/id_rsa; do \
if [ -f "$k" ]; then FOUND_KEY="$k"; break; fi ; \ if [ -f "$k" ]; then FOUND_KEY="$k"; break; fi ; \
done && \ done && \
if [ -n "$FOUND_KEY" ]; then \ if [ -n "$FOUND_KEY" ]; then \