Skip to content

Commit bc1a312

Browse files
authored
Dependabot auto-merge (#46)
1 parent fb87cfa commit bc1a312

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PR auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'yoanm/php-jsonrpc-http-server-swagger-doc-sdk'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
steps:
16+
- name: Dependabot metadata
17+
id: metadata
18+
uses: dependabot/[email protected]
19+
with:
20+
github-token: "${{ secrets.GITHUB_TOKEN }}"
21+
22+
- name: Add custom labels
23+
run: gh pr edit "${{github.event.pull_request.html_url}}" --add-label "with-nightly-tests"
24+
env:
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: Enable auto-merge for Dependabot PRs
28+
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
29+
run: gh pr merge --auto --squash "$PR_URL"
30+
env:
31+
PR_URL: ${{github.event.pull_request.html_url}}
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)