mirror of
https://github.com/appleboy/ssh-action.git
synced 2026-02-23 19:56:23 +08:00
refactor: streamline output handling for GITHUB_OUTPUT in workflows
- Write the stdout<<EOF and EOF markers directly to GITHUB_OUTPUT instead of using a group command - Simplify the process for capturing and appending command output to GITHUB_OUTPUT fix #403 fix #397 Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
parent
8e460a28f2
commit
fd269aa8d4
@ -71,11 +71,9 @@ if ! "${TARGET}" --version; then
|
||||
fi
|
||||
echo "======================================="
|
||||
if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then
|
||||
{
|
||||
echo 'stdout<<EOF'
|
||||
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
|
||||
echo 'EOF'
|
||||
} >>"${GITHUB_OUTPUT}"
|
||||
echo 'stdout<<EOF' >> "${GITHUB_OUTPUT}"
|
||||
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
|
||||
echo 'EOF' >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
"${TARGET}" "$@"
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user