Merge pull request #16661 from SimonRichardson/bootstrap-agent-tools #174
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Licenses" | |
on: | |
push: | |
branches: [2.9, 3.1, 3.2, 3.3, 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@v4 | |
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 |