diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 92a93095..5a719f85 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,6 +1,7 @@ -name: PR auto-{approve,merge} +name: "Bot auto-{approve,merge}" on: + workflow_dispatch: pull_request_target: permissions: @@ -9,27 +10,5 @@ permissions: jobs: dependabot: - name: Dependabot - runs-on: ubuntu-latest - - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - - name: Fetch Dependabot metadata - id: dependabot-metadata - uses: dependabot/fetch-metadata@v1 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - - name: Approve Dependabot PR - if: ${{steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'}} - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Merge Dependabot PR - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + uses: yettoapp/actions/.github/workflows/automerge_dependabot.yml@main + secrets: inherit