Skip to content

Commit 0630081

Browse files
committed
Add Dependabot configuration and dependency submission workflow
1 parent e68f5c1 commit 0630081

2 files changed

Lines changed: 145 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
version: 2
2+
updates:
3+
# Root workspace — Angular workspace config, dev tooling, and shared deps
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "03:30" # 30 min after dependency-submission workflow (03:00 UTC)
10+
timezone: "UTC"
11+
open-pull-requests-limit: 10
12+
labels:
13+
- "dependencies"
14+
commit-message:
15+
prefix: "chore(deps)"
16+
groups:
17+
angular:
18+
patterns:
19+
- "@angular/*"
20+
- "@angular-devkit/*"
21+
- "@angular-eslint/*"
22+
sunbird:
23+
patterns:
24+
- "@project-sunbird/*"
25+
karma-testing:
26+
patterns:
27+
- "karma*"
28+
- "jasmine*"
29+
- "@types/jasmine*"
30+
- "@types/jasminewd2"
31+
types:
32+
patterns:
33+
- "@types/*"
34+
35+
# Library package — the publishable Angular library (projects/sunbird-video-player)
36+
- package-ecosystem: "npm"
37+
directory: "/projects/sunbird-video-player"
38+
schedule:
39+
interval: "weekly"
40+
day: "monday"
41+
time: "03:30"
42+
timezone: "UTC"
43+
open-pull-requests-limit: 5
44+
labels:
45+
- "dependencies"
46+
commit-message:
47+
prefix: "chore(deps)"
48+
groups:
49+
sunbird:
50+
patterns:
51+
- "@project-sunbird/*"
52+
53+
# Web component build — standalone ES module distribution
54+
- package-ecosystem: "npm"
55+
directory: "/web-component"
56+
schedule:
57+
interval: "weekly"
58+
day: "monday"
59+
time: "03:30"
60+
timezone: "UTC"
61+
open-pull-requests-limit: 5
62+
labels:
63+
- "dependencies"
64+
commit-message:
65+
prefix: "chore(deps)"
66+
67+
# Keep GitHub Actions workflow action versions updated
68+
- package-ecosystem: "github-actions"
69+
directory: "/"
70+
schedule:
71+
interval: "weekly"
72+
day: "monday"
73+
time: "03:30"
74+
timezone: "UTC"
75+
labels:
76+
- "dependencies"
77+
commit-message:
78+
prefix: "chore(ci)"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Dependency Submission
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * 1' # 03:00 UTC every Monday — runs before Dependabot (03:30)
6+
push:
7+
branches: [master]
8+
paths:
9+
- 'package.json'
10+
- 'package-lock.json'
11+
- 'projects/sunbird-video-player/package.json'
12+
- 'projects/sunbird-video-player/package-lock.json'
13+
- 'web-component/package.json'
14+
pull_request:
15+
branches: [master]
16+
paths:
17+
- 'package.json'
18+
- 'package-lock.json'
19+
- 'projects/sunbird-video-player/package.json'
20+
- 'projects/sunbird-video-player/package-lock.json'
21+
- 'web-component/package.json'
22+
workflow_dispatch:
23+
24+
permissions:
25+
contents: write
26+
27+
jobs:
28+
submit-npm-root:
29+
name: Submit npm (root)
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: '22'
36+
- uses: advanced-security/npm-dependency-submission-action@v1
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
40+
submit-npm-library:
41+
name: Submit npm (projects/sunbird-video-player)
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: actions/setup-node@v4
46+
with:
47+
node-version: '22'
48+
- uses: advanced-security/npm-dependency-submission-action@v1
49+
with:
50+
token: ${{ secrets.GITHUB_TOKEN }}
51+
directory: ./projects/sunbird-video-player
52+
53+
submit-npm-web-component:
54+
name: Submit npm (web-component)
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: actions/setup-node@v4
59+
with:
60+
node-version: '22'
61+
# No lock file in web-component/ — generate one without installing node_modules
62+
- run: npm install --package-lock-only
63+
working-directory: web-component
64+
- uses: advanced-security/npm-dependency-submission-action@v1
65+
with:
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
directory: ./web-component

0 commit comments

Comments
 (0)