Skip to content

Commit 3f040d8

Browse files
committed
check fix for when file is not present
1 parent 1606fb5 commit 3f040d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/update_version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
- name: Check if changes exist
4343
id: check_changes
4444
run: |
45-
if git diff --quiet version.txt; then
45+
git add version.txt
46+
if git diff --staged --quiet; then
4647
echo "has_changes=false" >> $GITHUB_OUTPUT
4748
else
4849
echo "has_changes=true" >> $GITHUB_OUTPUT
4950
fi
50-
5151
- name: Create PR for version.txt update
5252
if: steps.check_changes.outputs.has_changes == 'true'
5353
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8

0 commit comments

Comments
 (0)