feat(workflows): ensure SSH dir exists before scanning host
Some checks failed
Test! / test (push) Failing after 1m17s

Preemptively creating the `~/.ssh` directory before attempting to add the SSH server's host key to `known_hosts`. This change prevents potential failures in CI workflows where the `.ssh` directory might not exist on a fresh runner environment, ensuring a smoother and more reliable setup for SSH connections.

This adjustment enhances the resilience of the testing workflow by avoiding errors related to missing directories, thereby improving automated testing reliability and efficiency.
This commit is contained in:
Kumi 2024-04-22 17:06:21 +02:00
parent efe8c1a37f
commit c72c45f47b
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -36,6 +36,7 @@ jobs:
- name: Trust SSH server's host key (to prevent interactive prompt)
run: |
mkdir -p ~/.ssh
ssh-keyscan -p 2222 -H localhost >> ~/.ssh/known_hosts
- name: Connect to SSH server using SSH key