mirror of
https://github.com/dagger/dagger-for-github.git
synced 2025-12-31 04:30:01 +11:00
tee both stdout and stderr
Signed-off-by: Jeremy Adams <jeremy@dagger.io>
This commit is contained in:
parent
b8e91e035e
commit
9c86de824d
1 changed files with 8 additions and 9 deletions
17
action.yml
17
action.yml
|
|
@ -77,16 +77,15 @@ runs:
|
|||
tmpout=$(mktemp)
|
||||
tmperr=$(mktemp)
|
||||
|
||||
# Run the command and capture stdout and stderr separately
|
||||
cd ${{ inputs.workdir }} && {
|
||||
DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
|
||||
dagger \
|
||||
${{ inputs.dagger-flags }} \
|
||||
${{ inputs.verb }} \
|
||||
${INPUT_MODULE:+-m $INPUT_MODULE} \
|
||||
${{ inputs.args }}
|
||||
} >"${tmpout}" 2>"${tmperr}" # Redirect stdout to tmpout and stderr to tmperr
|
||||
|
||||
DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
|
||||
dagger \
|
||||
${{ inputs.dagger-flags }} \
|
||||
${{ inputs.verb }} \
|
||||
${INPUT_MODULE:+-m $INPUT_MODULE} \
|
||||
${{ inputs.args }}
|
||||
} > >(tee "${tmpout}") 2> >(tee "${tmperr}" >&2)
|
||||
|
||||
# Send stdout to GITHUB_OUTPUT
|
||||
(echo -n "stdout=" && cat "${tmpout}") >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue