From 616cdfe8194e178270b194f4a48e88d40b202176 Mon Sep 17 00:00:00 2001 From: Yannic Labonte Date: Fri, 15 Mar 2024 00:58:36 +0100 Subject: [PATCH] Fix/simplify dependabot PR auto-merge action --- .github/workflows/automerge.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) 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: