-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update credentials: Use git directly (#3516)
* Use git directly This also debugs using gh auth status when something has gone wrong. And disables the persisting of credentails through checkout. * Remove maintest
- Loading branch information
1 parent
4568d68
commit d2b671d
Showing
1 changed file
with
12 additions
and
11 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 |
---|---|---|
|
@@ -10,22 +10,23 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: Update contributors | ||
run: make update-contributors | ||
|
||
- name: Update git credentials | ||
run: git remote set-url origin https://x-access-token:${{ secrets.BOT_GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_user_name: Pyroscope Bot | ||
commit_user_email: [email protected] | ||
commit_author: 'Pyroscope Bot <[email protected]>' | ||
commit_message: 'docs: updates the list of contributors in README [skip ci]' | ||
file_pattern: README.md | ||
push_options: '--force-with-lease' | ||
- name: Commit and push changes | ||
run: | | ||
git config --local user.name 'Pyroscope Bot' | ||
git config --local user.email '[email protected]' | ||
if ! git diff --exit-code README.md; then | ||
git add README.md | ||
git commit -m 'docs: updates the list of contributors in README [skip ci]' | ||
gh auth status | ||
git push --force https://x-access-token:${{ secrets.BOT_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:main | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} |