Skip to content

Commit 1ba30f5

Browse files
authored
Merge pull request #147 from OAI/copilot/add-dependabot-configuration
ci: add dependabot configuration for actions, npm, and bundler
2 parents df062f4 + 99d53b8 commit 1ba30f5

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions updates
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
open-pull-requests-limit: 10
9+
10+
# npm updates with vitest grouping
11+
- package-ecosystem: "npm"
12+
directory: "/"
13+
schedule:
14+
interval: "daily"
15+
open-pull-requests-limit: 10
16+
groups:
17+
vitest:
18+
patterns:
19+
- "*vitest*"
20+
21+
# Bundler (gem) updates
22+
- package-ecosystem: "bundler"
23+
directory: "/"
24+
schedule:
25+
interval: "daily"
26+
open-pull-requests-limit: 10
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Auto-merge dependabot updates
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
11+
jobs:
12+
13+
dependabot-merge:
14+
15+
runs-on: ubuntu-latest
16+
17+
if: ${{ github.actor == 'dependabot[bot]' }}
18+
19+
steps:
20+
- name: Dependabot metadata
21+
id: metadata
22+
uses: dependabot/[email protected]
23+
with:
24+
github-token: "${{ secrets.GITHUB_TOKEN }}"
25+
26+
- name: Enable auto-merge for Dependabot PRs
27+
# Only if version bump is not a major version change
28+
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
29+
run: gh pr merge --auto --merge "$PR_URL"
30+
env:
31+
PR_URL: ${{github.event.pull_request.html_url}}
32+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)