File tree Expand file tree Collapse file tree 1 file changed +7
-28
lines changed
Expand file tree Collapse file tree 1 file changed +7
-28
lines changed Original file line number Diff line number Diff line change 1+ # This is a templated file from https://github.com/adoptium/.eclipsefdn/tree/main/otterdog/policies/require_dependabot_auto_merge.yml
12name : Dependabot auto-merge
2- on : workflow_call
3+ on : pull_request_target
34
4- permissions :
5- contents : write
6- pull-requests : write
5+ permissions : read-all
76
87jobs :
98 dependabot :
10- runs-on : ubuntu-latest
11- if : ${{ github.actor == 'dependabot[bot]' }}
12- steps :
13- - name : Dependabot metadata
14- id : metadata
15- uses : dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
16- with :
17- github-token : " ${{ secrets.GITHUB_TOKEN }}"
18-
19- - name : Approve Dependabot PRs
20- # Don't approve semver major patches
21- if : ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
22- run : gh pr review --approve "$PR_URL"
23- env :
24- PR_URL : ${{github.event.pull_request.html_url}}
25- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
26-
27- - name : Enable auto-merge for Dependabot PRs
28- # Don't merge semver major patches
29- if : ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
30- run : gh pr merge --auto --squash "$PR_URL"
31- env :
32- PR_URL : ${{github.event.pull_request.html_url}}
33- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
9+ permissions :
10+ contents : write
11+ pull-requests : write
12+ uses : adoptium/.github/.github/workflows/dependabot-auto-merge.yml@main
You can’t perform that action at this time.
0 commit comments