fix(ci): drop ssh-keyscan, use StrictHostKeyChecking=accept-new instead
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:
@@ -26,13 +26,12 @@ jobs:
|
|||||||
- name: Set up SSH key
|
- name: Set up SSH key
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
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
|
chmod 600 ~/.ssh/deploy_key
|
||||||
ssh-keyscan -p 22 "${{ secrets.APP_HOST }}" >> ~/.ssh/known_hosts 2>/dev/null
|
|
||||||
|
|
||||||
- name: Sync images to server
|
- name: Sync images to server
|
||||||
run: |
|
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=(
|
IMAGES=(
|
||||||
gitea.siegeln.net/cameleer/cameleer-saas:latest
|
gitea.siegeln.net/cameleer/cameleer-saas:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user