From bea664fafecafc82e24fe7cc1fe73a90b949f2cb Mon Sep 17 00:00:00 2001 From: "aleksandr.vodyanov" Date: Wed, 22 May 2024 16:18:19 +0300 Subject: [PATCH] up --- Dockerfile | 2 +- entrypoint.sh | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 125f5f2..c5a9bba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # To obtain such a permit, you should contact AVROID, Ltd. # at https://avroid.ru -FROM harbor.avroid.tech/devops/addlicense:1.1.2 +FROM harbor.avroid.tech/devops/addlicense:1.1.3 COPY entrypoint.sh /entrypoint.sh COPY ./ /src diff --git a/entrypoint.sh b/entrypoint.sh index 86fda77..b4a767e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,10 +3,14 @@ echo "Processing event '$GITHUB_EVENT_NAME'" echo "List of files with absent license:" echo "===================================" err=0 -for file in $INPUT_INPUT_FILES; do - echo /app/addlicense -check "$1" $file | sh - if [ $? -ne 0]; then - err=$? - fi -done -exit $err +if [ -e $INPUT_INPUT_FILES ]; then + for file in $INPUT_INPUT_FILES; do + echo /app/addlicense -check "$1" $file | sh + if [ $? -ne 0]; then + err=$? + fi + done + exit $err +elif + echo /app/addlicense -check "$1" . | sh +fi