diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..adc597b --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,18 @@ +name: Automerge Dependabot Pull Requests + +on: + workflow_run: + workflows: ["CI"] + types: [completed] + +jobs: + on-success: + if: | + github.event.pull_request.draft == false && + github.event.workflow_run.conclusion == 'success' + needs: [commit-lint, lint, unit-tests] + runs-on: ubuntu-latest + steps: + - uses: tjenkinson/gh-action-auto-merge-dependency-updates@v1 + with: + allowed-actors: dependabot[bot] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 684492a..2cd0db6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,13 +77,3 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true - - automerge: - name: Automatically Merge Dependabot Pull Requests - if: github.event.pull_request.draft == false - needs: [commit-lint, lint, unit-tests] - runs-on: ubuntu-latest - steps: - - uses: tjenkinson/gh-action-auto-merge-dependency-updates@v1 - with: - allowed-actors: dependabot[bot]