Skip to content

Commit 2ff6416

Browse files
authored
CI: Add dependabot (#68)
#### Problem The repo has no dependabot setup. #### Summary of changes Similar to other program repos, add dependabot configuration and auto-approval of PRs.
1 parent 1da0cd5 commit 2ff6416

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "08:00"
8+
timezone: UTC
9+
open-pull-requests-limit: 6
10+
- package-ecosystem: npm
11+
directories:
12+
- "/"
13+
- "/clients/js"
14+
schedule:
15+
interval: daily
16+
time: "09:00"
17+
timezone: UTC
18+
open-pull-requests-limit: 6
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository_owner == 'solana-program'
12+
steps:
13+
- name: Enable auto-merge
14+
run: gh pr merge --auto --squash "$PR_URL"
15+
env:
16+
PR_URL: ${{ github.event.pull_request.html_url }}
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
- name: Approve
19+
run: gh pr review --approve "$PR_URL"
20+
env:
21+
PR_URL: ${{ github.event.pull_request.html_url }}
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)