Skip to content

Commit

Permalink
fix permission errors
Browse files Browse the repository at this point in the history
Use a token from the installed Github App which is configured with sufficient permissions.
  • Loading branch information
LKajan committed Nov 12, 2024
1 parent ffe0d60 commit 6b97736
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@ on:
- closed
- labeled

permissions:
contents: read

jobs:
backport:
name: Backport
runs-on: ubuntu-latest

permissions:
pull-requests: write

if: >
github.event.pull_request.merged
&& (
Expand All @@ -29,9 +23,15 @@ jobs:
)
)
steps:
- name: Generate a token to create a backport PR
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PULL_REGUESTER_APP_ID }}
private-key: ${{ secrets.PULL_REGUESTER_PRIVATE_KEY }}

- name: Backport Bot
id: backport

uses: m-kuhn/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.generate-token.outputs.token }}

0 comments on commit 6b97736

Please sign in to comment.