diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..96fdf8ac --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,23 @@ +# Dependabot Auto Merge +# +# This Action will automatically merge Pull Requests created by Dependabot. +name: 'Dependency review' +on: + pull_request: + branches: [ "main" ] + +permissions: + contents: write + pull-requests: write + +jobs: + dependency-auto-merge: + name: 'Auto merge Dependabot updates' + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: fastify/github-action-merge-dependabot@v3 + with: + use-github-auto-merge: true + diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index b66e680e..ee80c68b 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -60,23 +60,3 @@ jobs: # deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later # retry-on-snapshot-warnings: true - dependency-auto-merge: - name: 'Auto merge (Dependabot PR)' - runs-on: ubuntu-latest - needs: [dependency-submission, dependency-review] - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} - - steps: - - name: Fetch metadata - id: metadata - uses: dependabot/fetch-metadata@v2.2.0 - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - - - name: Enable auto-merge - id: auto-merge - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -