Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/workflows/licensed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ on:
workflow_dispatch:

jobs:
call-licensed:
name: Licensed
uses: actions/reusable-workflows/.github/workflows/licensed.yml@main
validate-cached-dependency-records:
runs-on: ubuntu-latest
name: Check licenses
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.7'

- name: Install licensed tool
run: |
cd "$RUNNER_TEMP"
curl -Lfs -o licensed.tar.gz https://github.com/licensee/licensed/archive/refs/tags/v5.0.4.tar.gz
tar -xzf licensed.tar.gz
cd licensed-5.0.4
bundle install

- name: Check cached dependency records
run: |
cd ${{ github.workspace }}
BUNDLE_GEMFILE=$RUNNER_TEMP/licensed-5.0.4/Gemfile bundle exec $RUNNER_TEMP/licensed-5.0.4/exe/licensed status
Comment on lines +13 to +40
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to improve this workflow because the version we were using was reporting false positives!

8 changes: 8 additions & 0 deletions .licensed.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
sources:
npm: true

# Force UTF-8 encoding
encoding: 'utf-8'

# Ignore problematic packages with encoding issues
ignored:
npm:
- form-data

allowed:
- apache-2.0
- bsd-2-clause
Expand Down
Loading
Loading