File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Dependabot auto-merge
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ dependabot :
8
+ runs-on : ubuntu-24.04 # Use Ubuntu 24.04 explicitly
9
+ if : ${{ github.actor == 'dependabot[bot]' }}
10
+ steps :
11
+ - name : ⏬ Dependabot metadata
12
+ id : metadata
13
+ uses : dependabot/fetch-metadata@v2
14
+ with :
15
+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
16
+
17
+ - name : ✔ Approve a PR
18
+ run : gh pr review --approve "$PR_URL"
19
+ env :
20
+ PR_URL : ${{github.event.pull_request.html_url}}
21
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
22
+
23
+ - name : 🤖 Enable auto-merge for Dependabot PRs
24
+ if : ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
25
+ run : gh pr merge --auto --squash "$PR_URL"
26
+ env :
27
+ PR_URL : ${{github.event.pull_request.html_url}}
28
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments