Skip to content

Commit

Permalink
Fix branching and environment variable in the PR
Browse files Browse the repository at this point in the history
Co-authored-by: David Leal <[email protected]>
  • Loading branch information
dlesnoff and Panquesito7 committed Jul 4, 2023
1 parent f94a151 commit 0456550
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/build_directory_md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
...

0 comments on commit 0456550

Please sign in to comment.