Skip to content

Commit 8b8856f

Browse files
committed
ci(security): restrict dependabot automerge to patch and minor updates
1 parent 2aefc62 commit 8b8856f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/dependabot-automerge.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.actor == 'dependabot[bot]'
1212
steps:
13-
- name: Enable automerge for Dependabot PRs
13+
- name: Fetch Dependabot Metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v2
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
19+
- name: Enable automerge for Patch and Minor updates
20+
if: |
21+
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
22+
steps.metadata.outputs.update-type == 'version-update:semver-minor'
1423
run: gh pr merge --auto --merge "$PR_URL"
1524
env:
1625
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)