mirror of
https://github.com/appleboy/ssh-action.git
synced 2026-02-23 11:36: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
|
fi
|
||||||
echo "======================================="
|
echo "======================================="
|
||||||
if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then
|
if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then
|
||||||
{
|
echo 'stdout<<EOF' >> "${GITHUB_OUTPUT}"
|
||||||
echo 'stdout<<EOF'
|
|
||||||
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
|
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
|
||||||
echo 'EOF'
|
echo 'EOF' >> "${GITHUB_OUTPUT}"
|
||||||
} >>"${GITHUB_OUTPUT}"
|
|
||||||
else
|
else
|
||||||
"${TARGET}" "$@"
|
"${TARGET}" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user