Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GHA] Fix copyright check workflow in case all changes are deletions (#35395)

Alina Kladieva07d6e284cafa
diff --git a/.github/workflows/copyright_check.yml b/.github/workflows/copyright_check.yml
index 47695e99f98..4a46109595d 100644
--- a/.github/workflows/copyright_check.yml
+++ b/.github/workflows/copyright_check.yml
@@ -24,7 +24,8 @@ jobs:
# Extract changed file names from the diff
# Lines starting with +++ indicate new/modified files (skip /dev/null for deleted files)
- grep '^+++' pr.diff | sed 's|^+++ b/||' | grep -v '/dev/null' > changed_files.txt
+ # || true prevents grep from failing with exit code 1 when all changes are deletions
+ grep '^+++' pr.diff | sed 's|^+++ b/||' | grep -v '/dev/null' > changed_files.txt || true
- name: Check copyright headers
id: check