Skip to content

Commit 55d355b

Browse files
authored
Merge pull request #89 from seamapi/add_openapi_daily_cron
add dependabot and relevant workflow to update, approve and merge @seamapi/* dependencies
2 parents 624c92b + 284111f commit 55d355b

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
target-branch: "main"
8+
versioning-strategy: "auto"
9+
allow:
10+
- dependency-name: "@seamapi/*"
11+
- dependency-type: production
12+
groups:
13+
seam:
14+
dependency-type: production
15+
update-types:
16+
- patch
17+
- minor
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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.actor == 'dependabot[bot]'
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Approve a PR
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}}
23+
- name: Enable auto-merge for Dependabot PRs
24+
if: contains(steps.metadata.outputs.dependency-names, '@seamapi/http')
25+
run: gh pr merge --auto --merge "$PR_URL"
26+
env:
27+
PR_URL: ${{github.event.pull_request.html_url}}
28+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)