From fbc612d2f5d3a65b2d2edc5fb9f64abeeb68a8b1 Mon Sep 17 00:00:00 2001 From: Rafal Stefanowski Date: Wed, 7 Sep 2022 11:17:10 +0200 Subject: [PATCH] Exclude renamed and copied files from copyright check Only added or modified files will be checked for a proper copyright statement. Signed-off-by: Rafal Stefanowski --- .github/workflows/pullrequest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 3f19d2e..ab4628a 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,10 @@ jobs: files_ignore: '.github/**' - name: List all changed files run: | - for FILE in ${{ steps.changed-files.outputs.all_changed_files }}; do + files_to_check=(${{ steps.changed-files.outputs.added_files }}) + files_to_check+=(${{ steps.changed-files.outputs.modified_files }}) + + for FILE in ${files_to_check[@]}; do REGEX=".*\.(.*)" if [[ "$FILE" =~ $REGEX ]] then