Skip to content

Commit 3319f6e

Browse files
Trying to fix gh dependabot auto-merge
1 parent 55e0540 commit 3319f6e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/dependabot-automerge.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ jobs:
1717
echo "target=patch" >> $GITHUB_OUTPUT
1818
fi
1919
20-
- uses: ahmadnassri/action-dependabot-auto-merge@v2
20+
- name: Dependabot metadata
21+
id: metadata
22+
uses: dependabot/fetch-metadata@4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d
2123
with:
22-
github-token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
23-
target: ${{ steps.set-target.outputs.target }}
24+
github-token: "${{ secrets.GH_ACTIONS_REPO_TOKEN }}"
25+
- name: Enable auto-merge for Dependabot PRs
26+
if: steps.metadata.outputs.update-type == format('version-update:semver-{0}', steps.set-target.outputs.target)
27+
run: gh pr merge --auto --merge "$PR_URL"
28+
env:
29+
PR_URL: ${{github.event.pull_request.html_url}}
30+
GH_TOKEN: ${{secrets.GH_ACTIONS_REPO_TOKEN}}

0 commit comments

Comments
 (0)