Adopt license compliance scripts into workflows, docs
This commit introduces the use of `go-licenses` within CI/CD and manual processes for generating / updating the license information used by GitHub CLI including the code required by license to be redistributed. During GitHub CLI pull requests, the `lint` workflow will notify users if this information is not updated.
This commit is contained in:
parent
b4ab34371d
commit
bd24865076
5 changed files with 122 additions and 0 deletions
13
.github/workflows/lint.yml
vendored
13
.github/workflows/lint.yml
vendored
|
|
@ -5,11 +5,15 @@ on:
|
|||
- "**.go"
|
||||
- go.mod
|
||||
- go.sum
|
||||
- ".github/licenses.tmpl"
|
||||
- "script/licenses*"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.go"
|
||||
- go.mod
|
||||
- go.sum
|
||||
- ".github/licenses.tmpl"
|
||||
- "script/licenses*"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -56,3 +60,12 @@ jobs:
|
|||
bin/golangci-lint run --out-format=colored-line-number --timeout=3m || STATUS=$?
|
||||
|
||||
exit $STATUS
|
||||
|
||||
# actions/setup-go does not setup the installed toolchain to be preferred over the system install,
|
||||
# which causes go-licenses to raise "Package ... does not have module info" errors.
|
||||
# for more information, https://github.com/google/go-licenses/issues/244#issuecomment-1885098633
|
||||
- name: Check licenses
|
||||
run: |
|
||||
export GOROOT=$(go env GOROOT)
|
||||
export PATH=${GOROOT}/bin:$PATH
|
||||
./script/licenses-check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue