From 0095a268ea286a968957ee123d0957e619333f09 Mon Sep 17 00:00:00 2001 From: Christian Zunker Date: Thu, 5 Dec 2024 14:09:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Auto=20approve=20cnspec=20bump?= =?UTF-8?q?=20PRs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Zunker --- .github/workflows/pr-test-lint.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-test-lint.yaml b/.github/workflows/pr-test-lint.yaml index 2f04417..c6c5975 100644 --- a/.github/workflows/pr-test-lint.yaml +++ b/.github/workflows/pr-test-lint.yaml @@ -94,7 +94,17 @@ jobs: github-token: "${{ secrets.GITHUB_TOKEN }}" filterOutClosed: true filterOutDraft: true - - name: Approve a PR - uses: fastify/github-action-merge-dependabot@v3 + # fetch a token for the mondoo-mergebot app + - name: Generate token + id: generate-token + uses: actions/create-github-app-token@v1 with: - pr-number: ${{ steps.pr.outputs.number }} + app-id: ${{ secrets.MONDOO_MERGEBOT_APP_ID }} + private-key: ${{ secrets.MONDOO_MERGEBOT_APP_PRIVATE_KEY }} + # automerge using bot token + - name: Approve and merge a PR + run: | + gh pr review ${{ steps.pr.outputs.number }} --approve + gh pr merge ${{ steps.pr.outputs.number }} --squash + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }}