fix: ensure SSH private key has trailing newline in CI workflow
Some checks failed
CI/CD / syntax-check (push) Successful in 1m10s
CI/CD / deploy (push) Failing after 11m44s

printf '%s' strips trailing newlines; use printf '%s\n' to ensure
the OpenSSH key file is well-formed and passes libcrypto validation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jack 2026-03-22 15:18:09 +07:00
parent a7b14759af
commit 54ba45acaa

View file

@ -49,7 +49,7 @@ jobs:
- name: Configure SSH - name: Configure SSH
run: | run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
printf '%s' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
# Scan host keys directly (no need for SSH_KNOWN_HOSTS secret) # Scan host keys directly (no need for SSH_KNOWN_HOSTS secret)
ssh-keyscan -p 22 87.249.49.32 >> ~/.ssh/known_hosts ssh-keyscan -p 22 87.249.49.32 >> ~/.ssh/known_hosts