Skip to content

Commit cdd320a

Browse files
authored
chore: fine-tune Dependabot for GitHub actions (#295)
1 parent 26192e8 commit cdd320a

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
* @vladisavvv
1+
* @adubovik
22
/.github/ @nepalevov @alexey-ban

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@ updates:
2020
commit-message:
2121
# Prefix all commit messages with "chore: "
2222
prefix: "chore"
23+
groups:
24+
ai-dial-ci:
25+
applies-to: version-updates
26+
patterns:
27+
- "epam/ai-dial-ci/*"
28+
github-actions:
29+
applies-to: version-updates
30+
patterns:
31+
- "*"
32+
exclude-patterns:
33+
- "epam/ai-dial-ci/*"
34+
open-pull-requests-limit: 10
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Dependabot Automation
2+
3+
on: pull_request_target
4+
5+
permissions: {}
6+
7+
jobs:
8+
dependabot:
9+
runs-on: ubuntu-latest
10+
if: |
11+
github.event.pull_request.user.login == 'dependabot[bot]' &&
12+
github.repository_owner == 'epam'
13+
steps:
14+
- name: Dependabot metadata
15+
id: metadata
16+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
17+
- name: Approve PR
18+
run: gh pr review --approve "$PR_URL"
19+
env:
20+
PR_URL: ${{ github.event.pull_request.html_url }}
21+
GH_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }}
22+
- name: Merge PR
23+
if: |
24+
steps.metadata.outputs.dependency-group == 'ai-dial-ci' &&
25+
steps.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+
GH_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }}

0 commit comments

Comments
 (0)