File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,14 +61,6 @@ if [ -z "$TAG_TO_ADD" ] || [ -z "$DOCKER_REGISTRY" ]; then
6161 exit 1
6262fi
6363
64- # stdin에서 이미지 목록을 배열로 읽기
65- mapfile -t IMAGES
66-
67- if [ ${# IMAGES[@]} -eq 0 ]; then
68- echo " Error: No images found"
69- exit 1
70- fi
71-
7264# if ECR
7365if [[ " $DOCKER_REGISTRY " == * " .dkr.ecr." * ]]; then
7466 TOKEN=$( aws ecr get-login-password --region us-east-1)
@@ -79,6 +71,17 @@ if [[ -z "$TOKEN" && "$DOCKER_REGISTRY" == *".dkr.ecr."* ]]; then
7971 exit 1
8072fi
8173
74+ # stdin에서 이미지 목록을 배열로 읽기
75+ IMAGES=()
76+ while IFS= read -r line; do
77+ IMAGES+=(" $line " )
78+ done
79+
80+ if [ ${# IMAGES[@]} -eq 0 ]; then
81+ echo " Error: No images found"
82+ exit 1
83+ fi
84+
8285for IMAGE in " ${IMAGES[@]} " ; do
8386 if [[ $IMAGE != * " $DOCKER_REGISTRY " * ]]; then
8487 echo " Skipping: $IMAGE (not from $DOCKER_REGISTRY )"
You can’t perform that action at this time.
0 commit comments