-
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.
add logic to push only when there are changes in the submodules
- Loading branch information
Showing
1 changed file
with
11 additions
and
4 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 |
---|---|---|
|
@@ -20,9 +20,16 @@ jobs: | |
|
||
- name: Update submodules to latest commit | ||
run: | | ||
git config --global user.name "$GitHub Actions Bot" | ||
git config --global user.name "GitHub Actions Bot" | ||
git config --global user.email "[email protected]" | ||
git submodule update --remote --merge | ||
git add . | ||
git commit -m "Update submodules to latest" | ||
git push origin main | ||
if [[ $(git status --porcelain) ]]; then | ||
# Check if there are changes | ||
echo "Changes detected, committing and pushing..." | ||
git add . | ||
git commit -m "Update submodules to latest" | ||
git push origin main | ||
else | ||
echo "No changes detected, skipping commit and push." | ||
fi |