Skip to content

Commit

Permalink
Update automerge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian authored Sep 5, 2023
1 parent 13a5cf7 commit 2d4ab2c
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: PR auto-{approve,merge}
name: "Bot auto-{approve,merge}"

on:
workflow_dispatch:
pull_request_target:

permissions:
Expand All @@ -9,27 +10,5 @@ permissions:

jobs:
dependabot:
name: Dependabot
runs-on: ubuntu-latest

if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Fetch Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve Dependabot PR
if: ${{steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'}}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Merge Dependabot PR
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

uses: yettoapp/actions/.github/workflows/automerge_dependabot.yml@main
secrets: inherit

0 comments on commit 2d4ab2c

Please sign in to comment.