-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.09 KB
/
license.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: "Licenses"
on:
push:
branches: [2.*, 3.*, 4.*, main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/license.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
go-license-check:
name: "go.mod license check"
runs-on: [self-hosted, linux, arm64, aws, large]
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Check Licenses
run: |
go install github.com/google/go-licenses@latest
# Before adding new licenses check with https://www.gnu.org/licenses/license-list.en.html#GPLCompatibleLicenses
# NOTE: GPL-2.0 is not included due to the possibility it can't be relicensed under a newer version.
go-licenses check github.com/juju/juju/... --allowed_licenses AGPL-3.0,LGPL-3.0,GPL-3.0,LGPL-2.1,Apache-2.0,BSD-3-Clause,BSD-2-Clause,MIT,Unlicense,ISC,MPL-2.0