Skip to content

Commit

Permalink
Merge pull request #34 from pablitoc/master
Browse files Browse the repository at this point in the history
Image Scanning
  • Loading branch information
kciter authored Jul 9, 2021
2 parents 95ceb55 + e5753ed commit 3d536d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3d536d1

Please sign in to comment.