Skip to content

Commit 72b0d93

Browse files
committed
fix daily job
1 parent caa9fe2 commit 72b0d93

1 file changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/daily-update.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,37 @@ jobs:
7878
eval "$(fnm env)"
7979
pnpm run generate
8080
81-
- name: Check for changes
81+
- name: Check for meaningful changes
8282
id: check
8383
run: |
84+
# First check if there are any changes at all
8485
if git diff --quiet HEAD -- data/ report/src/data/ pnpm-workspace.yaml pnpm-lock.yaml; then
8586
echo "has_changes=false" >> "$GITHUB_OUTPUT"
8687
echo "No changes detected - data is already up to date"
87-
else
88+
exit 0
89+
fi
90+
91+
# Check if changes are only in timestamp.json (which always changes)
92+
# Get list of changed files
93+
changed_files=$(git diff --name-only HEAD -- data/ report/src/data/ pnpm-workspace.yaml pnpm-lock.yaml)
94+
echo "Changed files:"
95+
echo "$changed_files"
96+
97+
# Check if any meaningful files changed (excluding timestamp.json)
98+
meaningful_changes=false
99+
while IFS= read -r file; do
100+
if [ "$file" != "report/src/data/timestamp.json" ]; then
101+
meaningful_changes=true
102+
break
103+
fi
104+
done <<< "$changed_files"
105+
106+
if [ "$meaningful_changes" = true ]; then
88107
echo "has_changes=true" >> "$GITHUB_OUTPUT"
89-
echo "Changes detected - will create PR"
108+
echo "Meaningful changes detected - will create PR"
109+
else
110+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
111+
echo "Only timestamp.json changed - skipping PR creation"
90112
fi
91113
92114
- name: Create Pull Request

0 commit comments

Comments
 (0)