diff --git a/.gitea/workflows/check-license.yml b/.gitea/workflows/check-license.yml index 93c164f..2967bea 100644 --- a/.gitea/workflows/check-license.yml +++ b/.gitea/workflows/check-license.yml @@ -1,4 +1,4 @@ -# Copyright AVROID, Ltd., 2024 +# Copyright (c) AVROID, Ltd., 2024 # # You can not use the contents of the file in any way without # AVROID, Ltd. written permission. @@ -49,7 +49,7 @@ jobs: - name: Check license for changed files id: check_license if: steps.changed-files-specific.outputs.any_changed == 'true' - uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/addlicense-docker-action.git@v1.13 + uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/addlicense-docker-action.git@v10 with: input_files: ${{ steps.changed-files-specific.outputs.all_changed_files }} exclude_pattern: diff --git a/Dockerfile b/Dockerfile index d24c7bc..d56f738 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 diff --git a/action.yml b/action.yml index 66b02fd..5b1be05 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -# Copyright AVROID, Ltd., 2024 +# Copyright (c) AVROID, Ltd., 2024 # # You can not use the contents of the file in any way without # AVROID, Ltd. written permission. diff --git a/entrypoint.sh b/entrypoint.sh index da2b1f0..c1c5392 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,10 +7,19 @@ # To obtain such a permit, you should contact AVROID, Ltd. # at https://avroid.ru - echo "Processing event '$GITHUB_EVENT_NAME'" echo "List of files with absent license:" echo "===================================" -for file in $INPUT_INPUT_FILES; do - echo /app/addlicense -check "$1" $file | sh -done +IFS=' ' +if [ -n "$INPUT_INPUT_FILES" ]; then + err=0 + for file in $INPUT_INPUT_FILES; do + echo /app/addlicense -check "$1" "$file" | sh + if [ $? -ne 0 ]; then + err=1 + fi + done + exit $err +else + echo /app/addlicense -check "$1" "." | sh +fi