[ci] Fix check-licenses (#1208)

* [DNM] Debug check-licenses

* fix gha

* add permissions

* add install

* add debug

* try one path

* run for each repo

* rm check d labels

* run 3 in parallel

* try fail-fast: false

* fix gitlab pipeline
This commit is contained in:
Alexander Samusev
2023-08-28 16:53:43 +02:00
committed by GitHub
parent 41fb4cc355
commit c58db69585
2 changed files with 16 additions and 60 deletions
+16 -6
View File
@@ -3,22 +3,32 @@ name: Check licenses
on:
pull_request:
permissions:
packages: read
jobs:
check-licenses:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
repo: [polkadot, substrate, cumulus]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/setup-node@v3.8.1
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@paritytech'
- name: Check the licenses
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@paritytech"
- name: Check the licenses for ${{ matrix.repo }}
run: |
shopt -s globstar
npx --yes https://github.com/paritytech/license-scanner scan \
echo "install"
npm install -g @paritytech/license-scanner@0.0.5
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