From 129aa1306593f80c4170d6a3e7854dcd24c8bc57 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 22 Apr 2023 10:03:25 +0200 Subject: [PATCH] Deploy after auto merge --- .github/workflows/pull_request.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 6027084..2bf0987 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -17,17 +17,22 @@ jobs: permissions: pull-requests: write contents: write - env: - GH_TOKEN: ${{ github.token }} if: >- github.event.pull_request && github.event.pull_request.merged == false && ( github.event.pull_request.user.login == 'crocmagnon-pr[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' + || github.event.pull_request.user.login == 'dependabot[bot]' ) 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