File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -244,14 +244,12 @@ if [ -n "$INPUT_PREPARE_TASK_CONTAINER_IMAGE_CHANGES" ] && [ -n "$INPUT_PREPARE_
244244 waitOnTask " $TASK_ARN "
245245
246246 TASK_RESPONSE=$( describeTask " $TASK_ARN " )
247- EXIT_CODE=$( echo " $TASK_RESPONSE " | jq -r ' .tasks[0]?.containers[0]?.exitCode // 255' )
248-
249- if [ " $EXIT_CODE " -eq 0 ]; then
250- echo -e " ${GREEN} Task has executed successfully." ;
251- else
247+ if echo " $TASK_RESPONSE " | jq -e ' .tasks[0].containers[] | select((.exitCode // 255) != 0)' > /dev/null; then
252248 echo -e " ${RED} Task returned non-zero exit code: ${RESET_TEXT} $EXIT_CODE . Raw response is below:" ;
253249 echo -e " ${TASK_RESPONSE} "
254250 exit 1;
251+ else
252+ echo -e " ${GREEN} Task has executed successfully." ;
255253 fi
256254fi
257255
You can’t perform that action at this time.
0 commit comments