Skip to content

Commit fe2ea7f

Browse files
authored
Merge pull request #157 from Icinga/gha-compliance-check
GHA: Add License Compliance Check
2 parents d59f989 + c86dcf0 commit fe2ea7f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/compliance.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Compliance
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request: {}
7+
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+
12+
jobs:
13+
compliance:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: actions/setup-go@v6
18+
with:
19+
go-version: stable
20+
21+
- name: Download modules to local cache
22+
run: go mod download
23+
24+
- name: Install go-licenses
25+
run: go install github.com/google/go-licenses@latest
26+
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/icinga-go-library/... \
31+
--allowed_licenses BSD-2-Clause,BSD-3-Clause,ISC,MIT,MPL-2.0

0 commit comments

Comments
 (0)