File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ pull_request :
3+ branches : [ dependabot/* ]
4+
5+ name : Dependabot updates
6+ run-name : Dependabot
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ dependabot :
13+ runs-on : ubuntu-latest
14+ if : ${{ github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'aws-powertools/powertools-lambda-java' }}
15+ permissions :
16+ pull-requests : read
17+ steps :
18+ - id : dependabot-metadata
19+ name : Fetch Dependabot metadata
20+ uses : dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0
21+ - name : Fail workflow
22+ if : ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major' }}
23+ run : |
24+ echo "::error::Major version upgrades are not wanted"
25+ - name : Approve PR
26+ env :
27+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+ run : |
29+ gh pr review "${{ github.event.pull_request.html_url }}" --approve --body '🤖 Approved by another robot.'
30+ - name : Enable auto-merge on PR
31+ run : gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
32+ env :
33+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments