From 27b687e565b12513ca3c53f8de82c765439d4d70 Mon Sep 17 00:00:00 2001 From: GammaGames Date: Wed, 3 Apr 2024 10:02:10 -0600 Subject: [PATCH 1/2] rebase with upstream --- action.yml | 6 ++++++ entrypoint.sh | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 4a16472..26cdc45 100644 --- a/action.yml +++ b/action.yml @@ -73,6 +73,12 @@ inputs: request_pty: description: "Request a pseudo-terminal from the server." +outputs: + stdout: + description: 'Standard output of the executed commands.' + stderr: + description: 'Standard error of the executed commands.' + runs: using: "composite" steps: diff --git a/entrypoint.sh b/entrypoint.sh index f50d56e..6d7e1db 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -63,4 +63,12 @@ TARGET="${GITHUB_ACTION_PATH}/${CLIENT_BINARY}" echo "Will download ${CLIENT_BINARY} from ${DOWNLOAD_URL_PREFIX}" curl -fL --retry 3 --keepalive-time 2 "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o ${TARGET} chmod +x ${TARGET} -sh -c "${TARGET} $*" + +{ + sh -c "${TARGET} $*" +} 2> /tmp/errFile | tee /tmp/outFile + +stdout=$(cat /tmp/outFile) +stderr=$(cat /tmp/errFile) +echo "stdout=${stdout//$'\n'/\\n}" >> $GITHUB_OUTPUT +echo "stderr=${stderr//$'\n'/\\n}" >> $GITHUB_OUTPUT) From 396c696e031833b10e622afcf78ea81bcb27cf01 Mon Sep 17 00:00:00 2001 From: GammaGames Date: Wed, 3 Apr 2024 10:12:39 -0600 Subject: [PATCH 2/2] syntax fix --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 6d7e1db..71b3744 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -71,4 +71,4 @@ chmod +x ${TARGET} stdout=$(cat /tmp/outFile) stderr=$(cat /tmp/errFile) echo "stdout=${stdout//$'\n'/\\n}" >> $GITHUB_OUTPUT -echo "stderr=${stderr//$'\n'/\\n}" >> $GITHUB_OUTPUT) +echo "stderr=${stderr//$'\n'/\\n}" >> $GITHUB_OUTPUT