Skip to content

Commit fd269aa

Browse files
committed
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>
1 parent 8e460a2 commit fd269aa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

entrypoint.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@ if ! "${TARGET}" --version; then
7171
fi
7272
echo "======================================="
7373
if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then
74-
{
75-
echo 'stdout<<EOF'
76-
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
77-
echo 'EOF'
78-
} >>"${GITHUB_OUTPUT}"
74+
echo 'stdout<<EOF' >> "${GITHUB_OUTPUT}"
75+
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
76+
echo 'EOF' >> "${GITHUB_OUTPUT}"
7977
else
8078
"${TARGET}" "$@"
8179
fi

0 commit comments

Comments
 (0)