mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-12-22 14:11:48 +01:00
Use app token to auto-merge PR
This commit is contained in:
parent
b9e0e9e244
commit
a0fa261ea8
1 changed files with 7 additions and 3 deletions
10
.github/workflows/pull_request.yaml
vendored
10
.github/workflows/pull_request.yaml
vendored
|
@ -17,8 +17,6 @@ jobs:
|
|||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
if: >-
|
||||
github.event.pull_request
|
||||
&& github.event.pull_request.merged == false
|
||||
|
@ -29,5 +27,11 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Generate token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.PR_APP_ID }}
|
||||
private_key: ${{ secrets.PR_APP_PRIVATE_KEY }}
|
||||
- name: Auto merge
|
||||
run: gh pr merge ${{github.event.pull_request.number}} --delete-branch --rebase
|
||||
run: GITHUB_TOKEN=${{ steps.generate-token.outputs.token }} gh pr merge ${{github.event.pull_request.number}} --delete-branch --rebase
|
||||
|
|
Loading…
Reference in a new issue