Skip to content

Commit

Permalink
simplify auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Oct 3, 2023
1 parent 0451829 commit 4f6c493
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ on:
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' && github.actor == 'dependabot[bot]' && github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
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 --squash "$PR_URL"
- name: Auto-merge dependabot pull request
run: gh pr merge --repo ${GITHUB_REPOSITORY} --auto --squash "${PR_URL}"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 4f6c493

Please sign in to comment.