forked from benc-uk/icon-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to fix git commit when no changes
- Loading branch information
Rino
authored and
Rino
committed
Aug 14, 2024
1 parent
97b2d2d
commit 0f53ec2
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,5 @@ jobs: | |
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Github Actions" | ||
- name: git commit to dev | ||
run: | | ||
git add . | ||
git commit -a -m "Updates by gallery script" | ||
git push | ||
- name: git commit and push | ||
run: ./_tools/commit.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Navigate to the Git repository directory | ||
cd .. | ||
|
||
# Check if there are any changes | ||
if git diff-index --quiet HEAD --; then | ||
# No changes | ||
echo "No changes to commit." | ||
else | ||
# Changes detected, add all changes to staging | ||
git add . | ||
|
||
# Commit changes | ||
git commit -m "Updates by gallery script" | ||
|
||
# Optionally, push changes to remote repository | ||
git push | ||
fi |