Skip to content

Commit

Permalink
Commit the License Finder report as docs/package-licenses.html
Browse files Browse the repository at this point in the history
  • Loading branch information
masutaka committed Oct 21, 2024
1 parent ef2969c commit f06657d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
license_finder:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: read
env:
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,
Expand Down Expand Up @@ -40,3 +45,16 @@ jobs:
- 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'
run: license_finder report --format=html | tail -n +2 > "$HTML_REPORT"
- name: Commit HTML report and push
if: steps.changes.outputs.target == 'true'
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add "$HTML_REPORT"
git commit -m "Update $HTML_REPORT"
git push origin HEAD

0 comments on commit f06657d

Please sign in to comment.