diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 493ae50..5fd0979 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -1,27 +1,15 @@ name: Dependabot Auto Merge on: - pull_request_target: + pull_request: jobs: - worker: + auto-merge: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' steps: - - name: automerge - uses: actions/github-script@v7 + - uses: actions/checkout@v2 + - uses: ahmadnassri/action-dependabot-auto-merge@v2 with: - script: | - github.rest.pulls.createReview({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }) - github.rest.pulls.merge({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, - pull_number: context.payload.pull_request.number - }) + target: minor github-token: ${{ secrets.GITHUB_TOKEN }}