From 4fea231b5fbfd42b43f18c733ccd77d3a1823e75 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 08:51:01 +0000 Subject: [PATCH] Accept ssh-key as a raw PEM key, drop base64 requirement ssh-key was expected to be base64-encoded and decoded with `base64 --decode`, which is inconsistent with ssh-upload and ssh-command (both take the raw PEM directly) and an easy way to end up with a silently corrupt key file if the stored secret isn't actually base64. Write the input straight to the key file instead. --- action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 0c16bf5..ecada4b 100644 --- a/action.yml +++ b/action.yml @@ -37,11 +37,11 @@ runs: # 1. Setup the SSH directory mkdir -p ~/.ssh chmod 700 ~/.ssh - - # 2. Decode the Base64 secret back into a properly formatted file - echo "$SSH_KEY" | base64 --decode > ~/.ssh/gitea_key + + # 2. Write the private key to a file as-is + printf '%s\n' "$SSH_KEY" > ~/.ssh/gitea_key chmod 600 ~/.ssh/gitea_key - + # 3. Configure SSH for the custom port and bypass host key prompt cat >> ~/.ssh/config <