diff --git a/.github/workflows/pr-test-lint.yaml b/.github/workflows/pr-test-lint.yaml index ee1d9fc..52754de 100644 --- a/.github/workflows/pr-test-lint.yaml +++ b/.github/workflows/pr-test-lint.yaml @@ -85,7 +85,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 }}