diff --git a/action.yml b/action.yml index 405b14a..87cffc8 100644 --- a/action.yml +++ b/action.yml @@ -67,6 +67,9 @@ inputs: description: 'Enable debug mode.' allenvs: description: 'pass all environment variable to shell script.' +outputs: + stdout: + description: 'Standard output of the executed commands.' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index f880594..f20d300 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,14 @@ #!/bin/sh set -eu +set -o pipefail export GITHUB="true" -sh -c "/bin/drone-ssh $*" +{ + sh -c "/bin/drone-ssh $*" +} | tee /tmp/outFile + +echo "stdout<> $GITHUB_OUTPUT +cat /tmp/outFile >> $GITHUB_OUTPUT +echo "EOF" >> $GITHUB_OUTPUT