Decode Base64 SSH key to preserve formatting

This commit is contained in:
Isshi0417 2026-07-07 07:19:33 +00:00
parent 519c1cfdb1
commit fc1e359db9

View File

@ -19,11 +19,9 @@ jobs:
apt-get install -y ansible apt-get install -y ansible
- name: Set up SSH private key - name: Set up SSH private key
env:
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: | run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config