-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
7 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 |
---|---|---|
|
@@ -27,17 +27,19 @@ jobs: | |
run: | | ||
python generate_readme.py | ||
- name: Commit changes | ||
- name: Commit changes if any | ||
run: | | ||
# Configure git user info | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
# Add and commit the changes to README.md | ||
git config --local user.name "github-actions" | ||
git config --local user.email "[email protected]" | ||
git add README.md | ||
git commit -m "Update README with new data" | ||
if git diff-index --cached --quiet HEAD; then | ||
echo "No changes to commit." | ||
else | ||
git commit -m "Update README with new data" | ||
fi | ||
- name: Push changes to remote repository | ||
if: success() # Ensures the step only runs if previous steps succeeded | ||
run: | | ||
git push https://github-actions[bot]:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} | ||