Skip to content

Commit 4250dae

Browse files
authored
Merge pull request #1025 from Icinga/gha-compliance-unify
GHA: Unify License Compliance Workflow
2 parents ae3c8d8 + 3b8b178 commit 4250dae

File tree

4 files changed

+20
-117
lines changed

4 files changed

+20
-117
lines changed

.github/workflows/compliance.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
name: Compliance
2+
23
on:
34
push:
4-
branches:
5-
- main
6-
- 'support/*'
5+
branches: [ main ]
76
pull_request: {}
87

8+
permissions:
9+
# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#repository-permissions-for-contents
10+
contents: read
11+
912
jobs:
10-
licenses:
13+
compliance:
1114
runs-on: ubuntu-latest
1215
steps:
13-
- run: sudo apt install -y moreutils
16+
- uses: actions/checkout@v5
17+
- uses: actions/setup-go@v6
18+
with:
19+
go-version: stable
1420

15-
- uses: actions/setup-go@v6
16-
with:
17-
go-version: 1.x
21+
- name: Download modules to local cache
22+
run: go mod download
1823

19-
- uses: actions/checkout@v5
24+
- name: Install go-licenses
25+
run: go install github.com/google/go-licenses@latest
2026

21-
- run: .github/workflows/compliance/check-licenses.sh
27+
- name: Check licenses against allow list
28+
run: |
29+
# Pass allowed licenses as SPDX Identifiers: https://spdx.org/licenses/
30+
go-licenses check github.com/icinga/icingadb/... \
31+
--allowed_licenses BSD-2-Clause,BSD-3-Clause,GPL-2.0,ISC,MIT,MPL-2.0,Unlicense

.github/workflows/compliance/anonymize-license.pl

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/compliance/check-licenses.sh

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/compliance/ls-deps.pl

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)