fix(ci): drop ssh-keyscan, use StrictHostKeyChecking=accept-new instead
All checks were successful
CI / build (push) Successful in 1m16s
CI / docker (push) Successful in 17s

ssh-keyscan fails when the runner can't reach the host on port 22
during that step. Using accept-new on the ssh command itself is
equivalent for an ephemeral CI runner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-25 00:29:52 +02:00
parent b53840b77b
commit 9962ee99d9

View File

@@ -26,13 +26,12 @@ jobs:
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/deploy_key
printf '%s\n' "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -p 22 "${{ secrets.APP_HOST }}" >> ~/.ssh/known_hosts 2>/dev/null
- name: Sync images to server
run: |
SSH_CMD="ssh -i ~/.ssh/deploy_key -p 22 root@${{ secrets.APP_HOST }}"
SSH_CMD="ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=accept-new -p 22 root@${{ secrets.APP_HOST }}"
IMAGES=(
gitea.siegeln.net/cameleer/cameleer-saas:latest