diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 63d59084..1d6b1d10 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -2,25 +2,16 @@ name: Dependabot auto-merge on: pull_request permissions: - contents: read - pull-requests: read + contents: write + pull-requests: write jobs: dependabot: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} + if: github.actor == 'dependabot[bot]' steps: - - name: Generate token - id: generate_token - uses: tibdex/github-app-token@v1 - with: - app_id: ${{ secrets.BOT_APP_ID }} - private_key: ${{ secrets.BOT_PRIVATE_KEY }} - - - name: Authenticate cli - run: echo "${{ steps.generate_token.outputs.token }}" | gh auth login --with-token - - name: Enable auto-merge for Dependabot PRs run: gh pr merge --auto --merge "$PR_URL" env: - PR_URL: ${{ github.event.pull_request.html_url }} + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.CI_GITHUB_TOKEN}}