Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Single job checking the sub-repos in steps
  • Loading branch information
rzadp committed Aug 29, 2023
commit c9664b80bfbdeefb2aaabb8cb11323ad6786d26f
37 changes: 23 additions & 14 deletions .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ permissions:
jobs:
check-licenses:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
repo: [polkadot, substrate, cumulus]
env:
LICENSES: "'Apache-2.0' 'GPL-3.0-only' 'GPL-3.0-or-later WITH Classpath-exception-2.0'"
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -21,16 +20,26 @@ jobs:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@paritytech"
- name: Check the licenses for ${{ matrix.repo }}

- name: Check the licenses in Polkadot
run: |
shopt -s globstar
echo "install"
npm install -g @paritytech/[email protected]
echo "run for ${{ matrix.repo }}"
cd ${{ matrix.repo }}
npx @paritytech/license-scanner scan \
--ensure-licenses=Apache-2.0 \
--ensure-licenses=GPL-3.0-only \
./**/*.rs
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--ensure-licenses ${{ env.LICENSES }} \
-- ./polkadot/**/*.rs

- name: Check the licenses in Cumulus
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-licenses ${{ env.LICENSES }} \
--exclude ./cumulus/parachain-template \
-- ./cumulus/**/*.rs

- name: Check the licenses in Substrate
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-licenses ${{ env.LICENSES }} \
--exclude ./substrate/bin/node-template \
-- ./substrate/**/*.rs