Skip to content

Commit 313613e

Browse files
committed
Refactor PR teardown workflow to queue image deletions for recordprocessor ECR
1 parent 1baea36 commit 313613e

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/pr-teardown.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,14 @@ jobs:
9696
exit 0
9797
fi
9898
99+
IMAGE_IDS_ARGS=""
99100
for image_tag in ${MATCHING_TAGS}; do
100-
echo "Deleting recordprocessor image tag '${image_tag}'..."
101-
aws ecr batch-delete-image \
102-
--repository-name "${REPOSITORY_NAME}" \
103-
--region "${AWS_REGION}" \
104-
--image-ids imageTag="${image_tag}" \
105-
--output json
101+
echo "Queueing recordprocessor image tag '${image_tag}' for deletion..."
102+
IMAGE_IDS_ARGS="${IMAGE_IDS_ARGS} imageTag=${image_tag}"
106103
done
104+
105+
aws ecr batch-delete-image \
106+
--repository-name "${REPOSITORY_NAME}" \
107+
--region "${AWS_REGION}" \
108+
--image-ids ${IMAGE_IDS_ARGS} \
109+
--output json

0 commit comments

Comments
 (0)