From e80f8e4de304ac0940716299dd28884ad24dc325 Mon Sep 17 00:00:00 2001 From: Pablo Castillo Date: Wed, 7 Jul 2021 14:54:44 -0700 Subject: [PATCH 1/2] missed bash logic --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 177d896..a5a796a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -102,7 +102,7 @@ function set_ecr_repo_policy() { function put_image_scanning_configuration() { if [ "${1}" = true ]; then echo "== START SET IMAGE SCANNING CONFIGURATION" - if [ -f "${INPUT_IMAGE_SCANNING_CONFIGURATION}" ]; then + if [ "${INPUT_IMAGE_SCANNING_CONFIGURATION}" = true ]; then aws ecr put-image-scanning-configuration --repository-name $INPUT_REPO --image-scanning-configuration scanOnPush=${INPUT_IMAGE_SCANNING_CONFIGURATION} echo "== FINISHED SET IMAGE SCANNING CONFIGURATION" fi From e5753ed896fdc6c18eec742ba1e1de088d031ac0 Mon Sep 17 00:00:00 2001 From: Pablo Castillo Date: Wed, 7 Jul 2021 15:08:25 -0700 Subject: [PATCH 2/2] fixed issue with function --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index a5a796a..a05f38c 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,8 +26,8 @@ function main() { docker_build $INPUT_TAGS $ACCOUNT_URL create_ecr_repo $INPUT_CREATE_REPO set_ecr_repo_policy $INPUT_SET_REPO_POLICY - docker_push_to_ecr $INPUT_TAGS $ACCOUNT_URL put_image_scanning_configuration $INPUT_IMAGE_SCANNING_CONFIGURATION + docker_push_to_ecr $INPUT_TAGS $ACCOUNT_URL } function sanitize() {