mirror of
https://github.com/appleboy/ssh-action.git
synced 2026-03-19 19:30:18 +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
1 changed files with 3 additions and 5 deletions
|
|
@ -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' >> "${GITHUB_OUTPUT}"
|
||||||
echo 'EOF'
|
|
||||||
} >>"${GITHUB_OUTPUT}"
|
|
||||||
else
|
else
|
||||||
"${TARGET}" "$@"
|
"${TARGET}" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue