Skip to content

Commit 9c80275

Browse files
committed
fix: detect data changes without git add so version bump is included in PR
1 parent 3468353 commit 9c80275

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/update-data.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,15 @@ jobs:
8585
git config --global user.name "github-actions[bot]"
8686
git config --global user.email "github-actions[bot]@users.noreply.github.com"
8787
88-
- name: Check for changes
88+
- name: Check for data changes
8989
id: check-changes
9090
run: |
91-
git add python/packages/countries/countrystatecity_countries/data python/packages/countries/pyproject.toml python/packages/countries/countrystatecity_countries/__init__.py
92-
if git diff --cached --quiet; then
93-
echo "changed=false" >> $GITHUB_OUTPUT
94-
echo "No data changes detected"
95-
else
91+
if git diff --name-only -- python/packages/countries/countrystatecity_countries/data | grep -q .; then
9692
echo "changed=true" >> $GITHUB_OUTPUT
9793
echo "Data changes detected"
94+
else
95+
echo "changed=false" >> $GITHUB_OUTPUT
96+
echo "No data changes detected"
9897
fi
9998
10099
- name: Bump patch version

0 commit comments

Comments
 (0)