Skip to content

Commit ba124cf

Browse files
committed
fix: obtain exit code during check of task
1 parent 57bbd91 commit ba124cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

deploy.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ if [ -n "$INPUT_PREPARE_TASK_CONTAINER_IMAGE_CHANGES" ] && [ -n "$INPUT_PREPARE_
245245

246246
TASK_RESPONSE=$(describeTask "$TASK_ARN")
247247
if echo "$TASK_RESPONSE" | jq -e '.tasks[0].containers[] | select((.exitCode // 255) != 0)' > /dev/null; then
248+
EXIT_CODE=$(echo "$TASK_RESPONSE" | jq -r '.tasks[0].containers[] | select((.exitCode // 255) != 0) | .exitCode // 255')
249+
248250
echo -e "${RED}Task returned non-zero exit code: ${RESET_TEXT}$EXIT_CODE. Raw response is below:";
249251
echo -e "${TASK_RESPONSE}"
250252
exit 1;

0 commit comments

Comments
 (0)