From 8d1fc8be59a42d878010aa6c87a258596ee5eef1 Mon Sep 17 00:00:00 2001 From: megamiley Date: Mon, 15 Jun 2026 13:09:54 +0000 Subject: [PATCH] Update action.yml --- action.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 8a481e3..6335bb6 100644 --- a/action.yml +++ b/action.yml @@ -34,13 +34,16 @@ runs: HOST: ${{ inputs.host }} PORT: ${{ inputs.port }} run: | - # 1. Setup the SSH directory and private key + # 1. Setup the SSH directory mkdir -p ~/.ssh chmod 700 ~/.ssh - echo "$SSH_KEY" > ~/.ssh/gitea_key + + # 2. Safely write the private key and force a trailing newline + cat <<< "$SSH_KEY" > ~/.ssh/gitea_key + echo "" >> ~/.ssh/gitea_key chmod 600 ~/.ssh/gitea_key - # 2. Configure SSH for the custom port and bypass host key prompt + # 3. Configure SSH for the custom port and bypass host key prompt cat >> ~/.ssh/config <