Skip to content

Commit

Permalink
Update auto-dependabot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLimeGlass authored Dec 19, 2024
1 parent 0bc8cdf commit c1fc725
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/auto-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ name: Dependabot auto-merge
on: pull_request

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

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.5.1
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: "${{secrets.GITHUB_TOKEN}}"
- name: Enable auto-merge for Dependabot PRs
if: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit c1fc725

Please sign in to comment.