https://github.com/daynin/nodejs-license-checker
https://github.com/daynin/nodejs-license-checker
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/daynin/nodejs-license-checker
- Owner: daynin
- License: mit
- Created: 2021-04-09T13:08:36.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T11:14:25.000Z (almost 2 years ago)
- Last Synced: 2025-04-10T03:56:23.796Z (about 1 year ago)
- Language: JavaScript
- Size: 57.6 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node.js License Checker
It's a GitHub Action which helps you to find unallowed licenses in your project.
## Example
```yaml
name: Check Licenses
on:
push:
branches: [main]
# Run this action only if dependencies has changed
paths:
- 'yarn.lock'
pull_request:
paths:
- 'yarn.lock'
jobs:
licenses:
name: Check licenses
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Install only production dependencies
# if you don't care about licenses of devDependencies
# E.g. GPL license is allowed in devDependencies
- run: yarn --frozen-lockfile --production
# Use main branch or a specific version (e.g. @v0.2.0)
- uses: daynin/nodejs-license-checker@main
with:
exclude-private-packages: true
allow-only: |
MIT
BSD-3-Clause
ISC
```
## Input parameters
See supported input parameters list in [action.yml](./action.yml). Most of them are passed to [license-checker](https://github.com/davglass/license-checker), so you can check options description and examples [there](https://github.com/davglass/license-checker#options) or submit a PR passing a new option.
## Contributing
Don't forget to build changes and push them to GitHub (`dist` folder).