Skip to content

Commit 529f551

Browse files
authored
Update update_version.yml
1 parent 57c1947 commit 529f551

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/update_version.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ jobs:
2020
2121
- name: Commit and push version file
2222
run: |
23-
git config user.name "github-actions"
24-
git config user.email "[email protected]"
25-
git add VERSION.txt
26-
git commit -m "Update VERSION.txt" || echo "No changes to commit"
27-
git push
23+
if [[ "${{ github.event.head_commit.message }}" == *"Update VERSION.txt"* ]]; then
24+
echo "VERSION.txt already updated — skipping push to avoid loop."
25+
else
26+
git config user.name "github-actions"
27+
git config user.email "[email protected]"
28+
git add VERSION.txt
29+
git commit -m "Update VERSION.txt" || echo "No changes to commit"
30+
git push
31+
fi

0 commit comments

Comments
 (0)