Skip to content

Commit 7bae095

Browse files
authored
Merge pull request #706 from nextcloud/fix/only-merge-minor-patch
fix(dependabot): only auto-merge minor and patch updates
2 parents de034e3 + 121aba7 commit 7bae095

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

workflow-templates/dependabot-approve-merge.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ jobs:
4444
with:
4545
repo-token: ${{ secrets.GITHUB_TOKEN }}
4646

47+
- name: Dependabot metadata
48+
id: metadata
49+
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v3.0.0
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
4753
# GitHub actions bot approve
4854
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
4955
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
@@ -53,6 +59,6 @@ jobs:
5359
# Enable GitHub auto merge
5460
- name: Auto merge
5561
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # 2.0.0
56-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.pull_request.action == 'opened' || github.event.pull_request.action == 'reopened')
62+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.action == 'opened' || github.event.action == 'reopened') && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')
5763
with:
5864
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)