Skip to content

Commit

Permalink
tweak auto-merge for dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Jul 26, 2024
1 parent 67cadb1 commit 6d288c4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,3 @@ jobs:
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
done
dependabot:
runs-on: ubuntu-latest
needs: build
if: success() && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'

steps:
- name: Enable Auto-Merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
24 changes: 24 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependabot Auto-Merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'

steps:
- name: Dependabot Metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable Auto-Merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 6d288c4

Please sign in to comment.