Skip to content

Commit 9708b9c

Browse files
author
James Abbott
committed
ci: only auto merge when when patch updates
1 parent 154e3ad commit 9708b9c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/dependabot-approve-and-automerge.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ permissions:
1212
jobs:
1313
dependabot:
1414
runs-on: ubuntu-latest
15-
if: ${{ github.actor == 'dependabot[bot]' }}
15+
if: ${{ github.actor == 'dependabot[bot]' && github.repository_owner == 'crispthinking' }}
1616
steps:
1717
- name: Dependabot metadata
1818
id: metadata
1919
uses: dependabot/fetch-metadata@v2.2.0
2020
with:
2121
github-token: "${{ secrets.GITHUB_TOKEN }}"
2222
- name: Approve a PR
23+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
2324
run: gh pr review --approve "$PR_URL"
2425
env:
2526
PR_URL: ${{github.event.pull_request.html_url}}
2627
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2728
- name: Enable auto-merge for Dependabot PRs
29+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
2830
run: gh pr merge --auto --merge "$PR_URL"
2931
env:
3032
PR_URL: ${{github.event.pull_request.html_url}}

0 commit comments

Comments
 (0)