From 2c8bfba676c1780af1b11d4da3ca3fd106302655 Mon Sep 17 00:00:00 2001 From: josspo <31305886+josspo@users.noreply.github.com> Date: Wed, 20 Dec 2023 09:55:03 -0300 Subject: [PATCH 1/2] Create allowed-licenses.json --- .license/allowed-licenses.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .license/allowed-licenses.json diff --git a/.license/allowed-licenses.json b/.license/allowed-licenses.json new file mode 100644 index 0000000..7c531ca --- /dev/null +++ b/.license/allowed-licenses.json @@ -0,0 +1,9 @@ +[ + "Apache License 2.0", + "MIT", + "MS-EULA", + "Apache-2.0", + "LICENSE_MIT.txt", + "LICENSE", + "LICENSE.MD" +] From 75292663736bb2a81d096e9729a743be9a3b999d Mon Sep 17 00:00:00 2001 From: josspo <31305886+josspo@users.noreply.github.com> Date: Wed, 20 Dec 2023 09:55:48 -0300 Subject: [PATCH 2/2] Create license-scanning.yml --- .github/workflows/license-scanning.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/license-scanning.yml diff --git a/.github/workflows/license-scanning.yml b/.github/workflows/license-scanning.yml new file mode 100644 index 0000000..4947a9c --- /dev/null +++ b/.github/workflows/license-scanning.yml @@ -0,0 +1,24 @@ +name: License Scanning + +on: + push: + workflow_dispatch: + +jobs: + dotnet-modules-scan: + name: dotnet-scan + runs-on: ubuntu-latest + continue-on-error: false + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build project with dotnet + run: dotnet build --configuration Release + working-directory: 'src' + - name: Install dotnet-project-license + run: dotnet tool install --global dotnet-project-licenses --version 2.7.1 + working-directory: 'src' + - name: run dotnet-project-licenses + run: dotnet-project-licenses -i . --allowed-license-types ../.license/allowed-licenses.json + working-directory: 'src'