File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Auto-merge dependabot updates
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [ main ]
6
+
7
+ permissions :
8
+ pull-requests : write
9
+ contents : write
10
+
11
+ jobs :
12
+
13
+ dependabot-merge :
14
+
15
+ runs-on : ubuntu-latest
16
+
17
+ if : ${{ github.actor == 'dependabot[bot]' }}
18
+
19
+ steps :
20
+ - name : Dependabot metadata
21
+ id : metadata
22
+ uses : dependabot/fetch-metadata@v1.3.6
23
+ with :
24
+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
25
+
26
+ - name : Enable auto-merge for Dependabot PRs
27
+ # Only if version bump is not a major version change
28
+ if : ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
29
+ run : gh pr merge --auto --merge "$PR_URL"
30
+ env :
31
+ PR_URL : ${{github.event.pull_request.html_url}}
32
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments