Skip to content

Commit

Permalink
Move dependabot automerge to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinmp committed Jul 6, 2022
1 parent 61fe6fb commit 568b6ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 29 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,22 @@ jobs:
CI: true

automerge:
name: Auto Merge
needs: [test-typescript,test-python]
name: Auto Merge Dependabot
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
needs: [test-typescript,test-python]
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }}
steps:
- uses: fastify/github-action-merge-dependabot@v3.2.0
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: ${{secrets.PA_TOKEN}}
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for dependabot PRs
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

deploy:
name: 'Deploy'
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/dependabotautomerge.yml

This file was deleted.

0 comments on commit 568b6ec

Please sign in to comment.