fix: normalize escaped SSH private key secrets
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 18s

This commit is contained in:
2026-02-28 17:57:58 +00:00
parent 03fff813ac
commit 2d9d6cdcd5
3 changed files with 18 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ jobs:
exit 1
fi
printf '%s\n' "$KEY_CONTENT" | tr -d '\r' > ~/.ssh/id_ed25519
KEY_CONTENT="$KEY_CONTENT" python3 -c 'import os, pathlib; key=os.environ.get("KEY_CONTENT", "").replace("\r", ""); key=key.replace("\\n", "\n") if "\\n" in key and "\n" not in key else key; pathlib.Path.home().joinpath(".ssh", "id_ed25519").write_text(key if key.endswith("\n") else key + "\n")'
chmod 0600 ~/.ssh/id_ed25519
- name: Set up Terraform