Skip to content

Commit 84e8e38

Browse files
fix(ci): use npx for license-checker to avoid intermittent 403 errors
The global install step (`npm install -g license-checker`) intermittently fails with 403 Forbidden from the npm registry, blocking PRs. Switching to `npx --yes license-checker` eliminates the fragile global install.
1 parent 6eef6b3 commit 84e8e38

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/shield-license-compliance.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,22 @@ jobs:
3131
- name: Install dependencies
3232
run: npm ci --prefer-offline --no-audit --no-fund
3333

34-
- name: Install license-checker
35-
run: npm install -g license-checker
36-
3734
- name: Create reports directory
3835
run: mkdir -p license-reports
3936

4037
- name: Run license check (allowlist)
4138
id: allowlist
4239
continue-on-error: true
4340
run: |
44-
license-checker \
41+
npx --yes license-checker \
4542
--onlyAllow 'MIT;BSD-2-Clause;BSD-3-Clause;Apache-2.0;ISC;CC0-1.0;Unlicense;WTFPL;0BSD;CC-BY-3.0;CC-BY-4.0;BlueOak-1.0.0;Python-2.0' \
4643
--summary | tee license-reports/allowlist-check.txt
4744
4845
- name: Generate JSON report
49-
run: license-checker --json > license-reports/licenses.json
46+
run: npx --yes license-checker --json > license-reports/licenses.json
5047

5148
- name: Generate CSV report
52-
run: license-checker --csv --out license-reports/licenses.csv
49+
run: npx --yes license-checker --csv --out license-reports/licenses.csv
5350

5451
- name: Analyze results
5552
run: |

0 commit comments

Comments
 (0)