Skip to content

test

test #56

Workflow file for this run

name: License Compliance
on:
push:
jobs:
license_finder:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: read
env:
HTML_REPORT: docs/package-licenses.md
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: "package.json"
- run: bun install
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install License Finder
run: gem install -N license_finder
# - name: Run License Finder
# run: license_finder
# Commit the License Finder report as docs/package-licenses.md
- name: Generate HTML report
run: license_finder report --format=markdown | tail -n +2 > "$HTML_REPORT"
- name: Commit HTML report and push
run: |
git remote set-url origin "https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git branch
git add "$HTML_REPORT"
git commit -m "Update $HTML_REPORT"
git push origin HEAD:${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}