Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
masutaka committed Oct 22, 2024
1 parent 2a1b57a commit 405541b
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: License Compliance

on:
push:
branches:
- main
pull_request:

jobs:
license_finder:
Expand All @@ -17,41 +14,9 @@ jobs:
HTML_REPORT: docs/package-licenses.html
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

# Commit the License Finder report as docs/package-licenses.html
- name: Generate HTML report
if: steps.changes.outputs.target == 'true' && github.ref_name != github.event.repository.default_branch
run: license_finder report --format=html | tail -n +2 > "$HTML_REPORT"
run: date > "$HTML_REPORT"
- name: Commit HTML report and push
if: steps.changes.outputs.target == 'true' && github.ref_name != github.event.repository.default_branch
run: |
git remote set-url origin "https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git config user.name "$GITHUB_ACTOR"
Expand Down

0 comments on commit 405541b

Please sign in to comment.