Debian Codegraph @

.github/workflows/check-table-license.yml

raw symbols SCIP
1 name: Check the license of the tables
2
3 on:
4 workflow_dispatch:
5 push:
6 branches: [ master ]
7 paths:
8 - 'tables/*'
9
10 pull_request:
11 branches: [ master ]
12
13 permissions: # added using https://github.com/step-security/secure-workflows
14 contents: read
15
16 jobs:
17 check-licenses:
18 name: Check the license of the tables
19
20 runs-on: ubuntu-latest
21
22 steps:
23 - name: Harden Runner
24 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
25 with:
26 egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
27
28 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29 - name: Install dependencies
30 run: sudo apt-get update -qq && sudo apt-get install -y licensecheck
31 - name: Check licenses
32 # we check all tables for a license header. If any of the
33 # licenses is not LGPL-2.1+ or LGPL-3+ we flag a problem
34 run: |
35 test -z "$(licensecheck --check='\.(ctb|utb|cti|uti|dis)' --deb-fmt --machine tables/* | grep -Ev '(LGPL-2.1+|LGPL-3+)' | tee unknown_licenses.txt)"
36 - name: Store the list of files with unknown licenses
37 if: ${{ failure() }}
38 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
39 with:
40 name: unknown_licenses.txt
41 path: unknown_licenses.txt
42