Skip to content

Commit 9d7a6ff

Browse files
lukekarrysfritzy
authored andcommitted
chore: only audit production workspaces
After #5309 moved docs dependencies to proudction deps, we started failing our daily audit CI check. Currently these deps are production so they are available when we run `pack`, but they don't need to be audited since they are never present in our published tarball. This change runs `audit` on the root CLI and all workspaces within the `workspaces/` directory, which are the only production workspaces.
1 parent a09e19d commit 9d7a6ff

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
- name: Reset Deps
3232
run: node . run resetdeps -- --package-lock
3333
- name: Run Audit
34-
run: node . audit
34+
run: node . audit -iwr -w workspaces

scripts/template-oss/audit.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Audit
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# "At 08:00 UTC (01:00 PT) on Monday" https://crontab.guru/#0_8_*_*_1
7+
- cron: "0 8 * * 1"
8+
9+
jobs:
10+
audit:
11+
{{> job jobName="Audit Dependencies" jobDepFlags="--package-lock" }}
12+
- name: Run Audit
13+
run: {{ rootNpmPath }} audit -iwr -w workspaces

scripts/template-oss/root.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
'.github/workflows/ci-release.yml': 'ci-release.yml',
88
'.github/dependabot.yml': false,
99
'.github/workflows/post-dependabot.yml': false,
10+
'.github/workflows/audit.yml': 'audit.yml',
1011
},
1112
},
1213
workspaceRepo: {

0 commit comments

Comments
 (0)