mirror of
https://github.com/appleboy/ssh-action.git
synced 2025-07-01 21:07:25 +08:00
Compare commits
8 Commits
51610e446e
...
f154d3354f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f154d3354f | ||
![]() |
fbf2b7866a | ||
![]() |
5b73b09c92 | ||
![]() |
aed736182d | ||
![]() |
332ff99a47 | ||
![]() |
ec7832be1a | ||
![]() |
396c696e03 | ||
![]() |
27b687e565 |
@ -78,6 +78,12 @@ inputs:
|
|||||||
request_pty:
|
request_pty:
|
||||||
description: "Request a pseudo-terminal from the server."
|
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:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
@ -64,7 +64,15 @@ TARGET="${GITHUB_ACTION_PATH}/${CLIENT_BINARY}"
|
|||||||
echo "Will download ${CLIENT_BINARY} from ${DOWNLOAD_URL_PREFIX}"
|
echo "Will download ${CLIENT_BINARY} from ${DOWNLOAD_URL_PREFIX}"
|
||||||
curl -fsSL --retry 5 --keepalive-time 2 "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o ${TARGET}
|
curl -fsSL --retry 5 --keepalive-time 2 "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o ${TARGET}
|
||||||
chmod +x ${TARGET}
|
chmod +x ${TARGET}
|
||||||
|
|
||||||
echo "======= CLI Version ======="
|
echo "======= CLI Version ======="
|
||||||
sh -c "${TARGET} --version" # print version
|
sh -c "${TARGET} --version" # print version
|
||||||
echo "==========================="
|
echo "==========================="
|
||||||
|
{
|
||||||
sh -c "${TARGET} $*" # run the command
|
sh -c "${TARGET} $*" # run the command
|
||||||
|
} 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user