Skip to content

Commit

Permalink
Try automerge again
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed Mar 28, 2024
1 parent a264012 commit 116472d
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
name: Dependabot auto-merge

on:
pull_request:
merge_group:
on: pull_request

permissions:
pull-requests: write
contents: write
pull-requests: write

jobs:
automerge:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Echo auto-merge
run: echo "Update type is ${{steps.metadata.outputs.update-type}}, check is ${{contains(steps.metadata.outputs.update-type,'version-update:semver')}}"

- name: Enable auto-merge for Dependabot PRs
if: ${{contains(steps.metadata.outputs.update-type,'version-update:semver')}}
run: gh pr merge --auto --squash "$PR_URL"
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 116472d

Please sign in to comment.