From 3d434973db150f2463b4c1f27ada410b9d80e14a Mon Sep 17 00:00:00 2001 From: alvicsam Date: Fri, 25 Aug 2023 18:02:16 +0200 Subject: [PATCH] add check license --- .github/workflows/check-licenses.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/check-licenses.yml diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml new file mode 100644 index 000000000000..1e654f7b3070 --- /dev/null +++ b/.github/workflows/check-licenses.yml @@ -0,0 +1,26 @@ +name: Check licenses + +on: + pull_request: + +jobs: + check-licenses: + runs-on: ubuntu-22.04 + 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 + run: | + shopt -s globstar + + npx @paritytech/license-scanner@0.0.5 scan \ + --ensure-licenses=Apache-2.0 \ + --ensure-licenses=GPL-3.0-only \ + ./**/*.rs + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}