forked from TheAlgorithms/Nim
-
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.
Fix branching and environment variable in the PR
Co-authored-by: David Leal <[email protected]>
- Loading branch information
1 parent
f94a151
commit 0456550
Showing
1 changed file
with
15 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 |
---|---|---|
|
@@ -25,13 +25,23 @@ jobs: | |
git clean -f -x -d | ||
nim r .scripts/directory.nim > DIRECTORY.md | ||
- name: Commit changes | ||
- name: Setup Git configurations | ||
run: | | ||
git config --global user.name github-actions[bot] | ||
git config --global user.email '[email protected]' | ||
- name: Commit and push changes | ||
run: | | ||
git checkout -b directory_update-${{ github.sha }} | ||
date > generated.txt | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add DIRECTORY.md | ||
git commit -m "Update DIRECTORY.md" | ||
gh pr create --title "Update DIRECTORY.md" --review "@owner" --base "GITHUB_REF/main" | ||
git commit -m "docs: update DIRECTORY.md" | ||
git push origin directory_update-${{ github.sha }}:directory_update-${{ github.sha }} | ||
- name: Create a pull request | ||
run: | | ||
if [[ $(git log --branches --not --remotes) ]]; then | ||
gh pr create --base ${GITHUB_REF##*/} --head directory_update-${{ github.sha }} --title 'docs: update DIRECTORY.md' --body 'Updated the DIRECTORY.md file (see the diff. for changes).' | ||
fi | ||
... |