Skip to content

Commit

Permalink
Merge pull request #125 from seamapi/fix_dependabot_merge_workflow
Browse files Browse the repository at this point in the history
fix: dependabot workflow auto merge
  • Loading branch information
kainpets authored Mar 13, 2024
2 parents af17677 + c2dcf7a commit 98111c3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ permissions:
contents: write
pull-requests: write

# This workflow enables auto-merge for Dependabot PRs
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
jobs:
dependabot:
runs-on: ubuntu-latest
Expand All @@ -15,13 +17,8 @@ jobs:
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
if: contains(steps.metadata.outputs.dependency-names, '@seamapi/*')
if: contains(steps.metadata.outputs.dependency-names, '@seamapi/')
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down

0 comments on commit 98111c3

Please sign in to comment.