-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update workflow using git_secrets variables
- Loading branch information
Showing
1 changed file
with
13 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 |
---|---|---|
|
@@ -26,12 +26,16 @@ jobs: | |
- name: Run script | ||
run: python results/gen_result.py | ||
|
||
- name: Set Git Config | ||
run: | | ||
git config --global user.email "${{ secrets.MY_EMAIL }}" | ||
git config --global user.name "${{ secrets.MY_NAME }}" | ||
- name: Commit results if it changed | ||
run: | | ||
# if the results changed then commit the changes | ||
if [[ $(git status --porcelain) ]]; then | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Md Mijanur Rahman" | ||
git add results/best_runs.md | ||
git commit -am "Update results" || exit 0 | ||
git push | ||
fi | ||
|
@@ -45,8 +49,10 @@ jobs: | |
- name: Commit and push if it changed | ||
run: | | ||
git diff | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Md Mijanur Rahman" | ||
git commit -am "Update README with test results" || exit 0 | ||
git push | ||
if [[ $(git status --porcelain) ]]; then | ||
git add README.md | ||
git commit -am "Update README with test results" || exit 0 | ||
git push | ||
fi | ||
|