-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 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,53 @@ | ||
name: License Compliance | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
license_finder: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# To make the success of this job a prerequisite for merging into the main branch, | ||
# set a filter here instead of on: to determine whether or not to proceed to the next step. | ||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||
id: changes | ||
with: | ||
filters: | | ||
target: | ||
- .github/workflows/license.yml | ||
- bun.lockb | ||
- config/dependency_decisions.yml | ||
- config/license_finder.yml | ||
- package.json | ||
- uses: oven-sh/setup-bun@v2 | ||
if: steps.changes.outputs.target == 'true' | ||
with: | ||
bun-version-file: "package.json" | ||
- run: bun install | ||
if: steps.changes.outputs.target == 'true' | ||
- uses: ruby/setup-ruby@v1 | ||
if: steps.changes.outputs.target == 'true' | ||
with: | ||
ruby-version: '3.3' | ||
- name: Install License Finder | ||
if: steps.changes.outputs.target == 'true' | ||
run: gem install -N license_finder | ||
- name: Run License Finder | ||
if: steps.changes.outputs.target == 'true' | ||
run: license_finder | ||
|
||
# Upload it once for reference only. If it seems unnecessary, you can stop uploading. | ||
- name: Generate HTML report | ||
if: steps.changes.outputs.target == 'true' | ||
run: license_finder report --format=html > license-report.html | ||
- name: Upload HTML artifact | ||
if: steps.changes.outputs.target == 'true' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: license-report | ||
path: license-report.html |