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