@@ -75,29 +75,41 @@ runs:
75
75
INPUT_MODULE : ${{ inputs.module }}
76
76
run : |
77
77
tmpout=$(mktemp)
78
- # Run the command and capture its output in `tmpout`
79
- # while also displaying it in the logs
80
- cd ${{ inputs.workdir }} && { \
81
- DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
82
- dagger \
83
- ${{ inputs.dagger-flags }} \
84
- ${{ inputs.verb }} \
85
- ${INPUT_MODULE:+-m $INPUT_MODULE} \
86
- ${{ inputs.args }}; } | tee "${tmpout}"
87
-
88
- # Send the output to GITHUB_OUTPUT for further processing if needed
78
+ tmperr=$(mktemp)
79
+
80
+ # Run the command and capture stdout and stderr separately
81
+ cd ${{ inputs.workdir }} && {
82
+ DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
83
+ dagger \
84
+ ${{ inputs.dagger-flags }} \
85
+ ${{ inputs.verb }} \
86
+ ${INPUT_MODULE:+-m $INPUT_MODULE} \
87
+ ${{ inputs.args }}
88
+ } >"${tmpout}" 2>"${tmperr}" # Redirect stdout to tmpout and stderr to tmperr
89
+
90
+ # Send stdout to GITHUB_OUTPUT
89
91
(echo -n "stdout=" && cat "${tmpout}") >> "$GITHUB_OUTPUT"
90
-
91
- # Append formatted output to GITHUB_STEP_SUMMARY
92
+
93
+ # Append formatted stdout to GITHUB_STEP_SUMMARY
92
94
{
93
- echo "### Dagger Output "
95
+ echo "### Dagger stdout "
94
96
echo ""
95
97
echo "<pre><code>"
96
98
cat "${tmpout}"
97
99
echo "</code></pre>"
98
100
echo ""
99
101
} >> $GITHUB_STEP_SUMMARY
100
102
103
+ # Append formatted stderr to GITHUB_STEP_SUMMARY
104
+ {
105
+ echo "### Dagger stderr"
106
+ echo ""
107
+ echo "<pre><code>"
108
+ cat "${tmperr}"
109
+ echo "</code></pre>"
110
+ echo ""
111
+ } >> $GITHUB_STEP_SUMMARY
112
+
101
113
- if : inputs.engine-stop == 'true'
102
114
shell : bash
103
115
run : |
0 commit comments