fix: normalize escaped SSH private key secrets
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 18s
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 18s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user