Skip to content

Commit

Permalink
Fix permission issue from checkout action (#2558)
Browse files Browse the repository at this point in the history
The checkout action needs a token for `git push` to work.

Also reverts the `git config` change.
  • Loading branch information
oliversun9 authored Nov 10, 2023
1 parent 3b837ea commit de2169f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4
- name: Get GitHub app token
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ secrets.TOKEN_EXCHANGE_GH_APP_PRIVATE_KEY }}
- name: Checkout repository code
uses: actions/checkout@v4
with:
token: ${{ steps.app_token.outputs.token }}
- name: Set up Git name and email
run: |
git config --global user.email "251311+buf-release-bot[bot]@users.noreply.github.com"
git config --global user.name "buf-release-bot[bot]"
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Create release PR
run: bash ./make/buf/scripts/createreleasepr.bash
env:
Expand Down

0 comments on commit de2169f

Please sign in to comment.