From c73b559994de45c8111b9715589f991d2a4a541e Mon Sep 17 00:00:00 2001 From: Taras Drozdovskyi Date: Wed, 16 Aug 2023 03:20:36 +0300 Subject: [PATCH] Add github->action: Checking licenses using the Fossology tool (#712) Signed-off-by: Taras Drozdovskyi --- .github/workflows/fossology-check.yml | 33 +++++++++++++++++++++++++++ whitelist.json | 12 ++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/fossology-check.yml create mode 100644 whitelist.json diff --git a/.github/workflows/fossology-check.yml b/.github/workflows/fossology-check.yml new file mode 100644 index 00000000..d8847685 --- /dev/null +++ b/.github/workflows/fossology-check.yml @@ -0,0 +1,33 @@ +name: Fossology check +on: [push, pull_request] + +permissions: + contents: read + +jobs: + fossology: + runs-on: ubuntu-latest + + container: + image: fossology/fossology:scanner + + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + + - name: Fossology run + run: | + export GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}} + export GITHUB_PULL_REQUEST="None" + /bin/fossologyscanner repo nomos ojo copyright keyword + continue-on-error: true + + - name: Upload artifact + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce + with: + name: scan-fossology-report + path: ./results + + - name: Artifact download + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a + with: + name: scan-fossology-report \ No newline at end of file diff --git a/whitelist.json b/whitelist.json new file mode 100644 index 00000000..0d99ccee --- /dev/null +++ b/whitelist.json @@ -0,0 +1,12 @@ +{ + "licenses": [ + "BSD-2-Clause", + "BSD-3-Clause", + "Public-domain", + "MIT", + "Apache-2.0" + ], + "exclude": [ + "tools/*" + ] +} \ No newline at end of file