Skip to content

Commit 2b6354d

Browse files
authored
Merge pull request #107 from optave/fix/license-check-npx
fix(ci): use npx for license-checker and force-add gitignored DEPENDENCIES.json
2 parents f7f450b + fe22813 commit 2b6354d

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ jobs:
295295
if git diff --quiet HEAD -- package.json package-lock.json CHANGELOG.md generated/DEPENDENCIES.json; then
296296
echo "No version bump commit to push — skipping PR"
297297
else
298-
git add package.json package-lock.json CHANGELOG.md generated/DEPENDENCIES.json
298+
git add -f package.json package-lock.json CHANGELOG.md generated/DEPENDENCIES.json
299299
git commit -m "chore: release v${VERSION}"
300300
git push origin "HEAD:refs/heads/${BRANCH}"
301301
gh pr create \

.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)