diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index f2426ba..48d6d65 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,11 +1,6 @@ name: "Auto-Merge Dependabot PRs" -on: - workflow_run: - workflows: - - "CI Workflow" - types: - - completed +on: [ pull_request ] permissions: contents: write @@ -14,19 +9,12 @@ permissions: jobs: automerge: name: "Auto-merge Dependabot PR" + needs: + - analyze + - build runs-on: ubuntu-latest if: github.actor == 'dependabot[bot]' steps: - - name: "Fetch Dependabot metadata" - id: metadata - uses: dependabot/fetch-metadata@v1 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: "Approve the PR" - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: "Auto-merge the PRs" run: gh pr merge --auto --merge "$PR_URL" env: