Skip to content

Commit 2431a56

Browse files
fix: Refactor auto-merge conditions for dependabot updates (#78)
1 parent 22c941e commit 2431a56

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/dependabot-auto-merge.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@ jobs:
2727
PR_URL: ${{ github.event.pull_request.html_url }}
2828
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929

30-
- name: Enable auto-merge for patch and minor updates
30+
- name: Enable auto-merge (always for GitHub Actions; patch/minor otherwise)
3131
if: |
32-
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
33-
steps.metadata.outputs.update-type == 'version-update:semver-minor'
32+
steps.metadata.outputs.package-ecosystem == 'github-actions' ||
33+
(
34+
steps.metadata.outputs.package-ecosystem != 'github-actions' &&
35+
(
36+
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
37+
steps.metadata.outputs.update-type == 'version-update:semver-minor'
38+
)
39+
)
3440
run: gh pr merge --auto --squash "$PR_URL"
3541
env:
3642
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)