File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Dependabot auto-merge
2
+ on : pull_request
3
+
4
+ permissions :
5
+ contents : write
6
+ pull-requests : write
7
+
8
+ # WARNING - Make sure the repo:
9
+ # - has setup up branch protection rules (required status checks) - otherwise all PR will be merged without waiting for build results
10
+ # - allows auto-merge (settings -> general -> Pull Requests -> Allow Auto-Merge)
11
+
12
+ jobs :
13
+ dependabot :
14
+ runs-on : ubuntu-latest
15
+ if : ${{ github.actor == 'dependabot[bot]' }}
16
+ steps :
17
+ - name : Dependabot metadata
18
+ id : metadata
19
+ uses : dependabot/fetch-metadata@v1
20
+ with :
21
+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
22
+ - name : Enable auto-merge for Dependabot PRs
23
+ if : ${{steps.metadata.outputs.package-ecosystem == 'github_actions' || (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')}}
24
+ run : gh pr merge --auto --merge "$PR_URL"
25
+ env :
26
+ PR_URL : ${{github.event.pull_request.html_url}}
27
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments