Skip to content

Commit

Permalink
chore: Another try to fix update-contributors (#3515)
Browse files Browse the repository at this point in the history
* Newline after contributors

* Use the PAT for pushing changes correctly

Using action/checkout with token is broken for our usecase, implemented
a workaround from:

actions/checkout#664 (comment)
  • Loading branch information
simonswine authored Aug 23, 2024
1 parent 1d81a51 commit 7f0dc70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/update-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
# these are credentials for https://github.com/pyroscopebot
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- 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
Expand Down
5 changes: 5 additions & 0 deletions tools/update-contributors/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ func replaceReadme() error {
return err
}

_, err = f.WriteString("\n")
if err != nil {
return err
}

_, err = f.WriteString(s[end:])
if err != nil {
return err
Expand Down

0 comments on commit 7f0dc70

Please sign in to comment.