Merge pull request '[DO-467] fixed entrypoint.sh' (#5) from feature/DO-467--add-check-license into master

Reviewed-on: https://git.avroid.tech/Actions/addlicense-docker-action/pulls/5
This commit is contained in:
Aleksandr Vodyanov
2024-05-23 12:32:33 +03:00
4 changed files with 17 additions and 8 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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.

View File

@@ -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