mirror of
https://githubfast.com/appleboy/ssh-action
synced 2024-10-31 15:46:30 +00:00
Include stdout and stderr to file
This commit is contained in:
parent
2451745138
commit
a3c6d747c4
@ -67,6 +67,11 @@ inputs:
|
|||||||
description: 'Enable debug mode.'
|
description: 'Enable debug mode.'
|
||||||
allenvs:
|
allenvs:
|
||||||
description: 'pass all environment variable to shell script.'
|
description: 'pass all environment variable to shell script.'
|
||||||
|
outputs:
|
||||||
|
stdout:
|
||||||
|
description: 'Standard output of the executed commands.'
|
||||||
|
stderr:
|
||||||
|
description: 'Standard error of the executed commands.'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
@ -4,4 +4,11 @@ set -eu
|
|||||||
|
|
||||||
export GITHUB="true"
|
export GITHUB="true"
|
||||||
|
|
||||||
sh -c "/bin/drone-ssh $*"
|
{
|
||||||
|
sh -c "/bin/drone-ssh $*"
|
||||||
|
} 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…
Reference in New Issue
Block a user