Skip to content

Commit 1f57d51

Browse files
committed
Only print changed files if files changed
1 parent bda4524 commit 1f57d51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
# Get list of added or modified JSON files in subdirectories
4343
git diff --diff-filter=AM --name-only $BASE_COMMIT HEAD | grep '.*/.*\.json$' > changed_json_files.txt || true
4444
45-
# Output the list of files
46-
echo "Changed JSON files in subdirectories:"
47-
cat changed_json_files.txt
48-
4945
# Run check.py on each existing JSON file
5046
if [ -s changed_json_files.txt ]; then
47+
# Output the list of files
48+
echo "Changed JSON files in subdirectories:"
49+
cat changed_json_files.txt
50+
5151
while read -r file; do
5252
if [ -f "$file" ]; then
5353
if [ -s "$file" ]; then

0 commit comments

Comments
 (0)