File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 178178 echo " $image " >> " $PUBLISHED_EXPORTS_OUTPUT "
179179done
180180
181- # shellcheck disable=SC2129 disable=SC2086
182- if [[ " $GITHUB_OUTPUT " != " " ]]
183- then
184- echo " FAILED_EXPORTS<<EOF" >> $GITHUB_OUTPUT
185- cat $FAILED_EXPORTS_OUTPUT >> $GITHUB_OUTPUT
186- echo " EOF" >> $GITHUB_OUTPUT
181+ # write to a temp file if the GITHUB_OUTPUT pipe isn't set
182+ if [[ ! $GITHUB_OUTPUT ]]; then GITHUB_OUTPUT=/tmp/github_output.txt; fi
187183
188- echo " PUBLISHED_EXPORTS <<EOF" >> $GITHUB_OUTPUT
189- cat $PUBLISHED_EXPORTS_OUTPUT >> $ GITHUB_OUTPUT
190- echo " EOF" >> $GITHUB_OUTPUT
184+ echo " FAILED_EXPORTS <<EOF" | tee -a " $GITHUB_OUTPUT "
185+ cat " $FAILED_EXPORTS_OUTPUT " | tee -a " $ GITHUB_OUTPUT"
186+ echo " EOF" | tee -a " $GITHUB_OUTPUT "
191187
192- if [[ " ${skipWorkspace} " == " true" ]]
193- then
194- echo " WORKSPACE_SKIPPED_UNCHANGED_SINCE=${INPUTS_LAST_PUBLISH_COMMIT} " >> $GITHUB_OUTPUT
195- else
196- echo " WORKSPACE_SKIPPED_UNCHANGED_SINCE=false" >> $GITHUB_OUTPUT
197- fi
188+ echo " PUBLISHED_EXPORTS<<EOF" | tee -a " $GITHUB_OUTPUT "
189+ cat " $PUBLISHED_EXPORTS_OUTPUT " | tee -a " $GITHUB_OUTPUT "
190+ echo " EOF" | tee -a " $GITHUB_OUTPUT "
191+
192+ if [[ " ${skipWorkspace} " == " true" ]]
193+ then
194+ echo " WORKSPACE_SKIPPED_UNCHANGED_SINCE=${INPUTS_LAST_PUBLISH_COMMIT} " | tee -a " $GITHUB_OUTPUT "
195+ else
196+ echo " WORKSPACE_SKIPPED_UNCHANGED_SINCE=false" | tee -a " $GITHUB_OUTPUT "
198197fi
199198
200199# exit a return code equivalent to the number of errors
201- exit $(( ${# errors[@]} ))
200+ exit $(( ${# errors[@]} ))
You can’t perform that action at this time.
0 commit comments