-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add license check workflow and dependency
- added `license-checker` managing licenses - created a GitHub Actions workflow to generate and update LICENSES.md with dependency licenses
- Loading branch information
Showing
3 changed files
with
235 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: License Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- LICENSES.md | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
license_check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm install | ||
npm install --save-dev license-checker | ||
- name: Generate license report as json | ||
run: | | ||
node_modules/.bin/license-checker --json > licenses.json | ||
- name: Create LICENSES.md | ||
run: | | ||
echo "# License Report" > LICENSES.md | ||
echo "This file contains the licenses of the dependencies used in this project." >> LICENSES.md | ||
cat licenses.json >> LICENSES.md | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "Update LICENSES.md with latest dependencies information" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.