Skip to content

Commit 44df793

Browse files
authored
Merge pull request cli#12112 from cli/kw/revert-11370
Integrate license checks back into lint workflow
2 parents 152d328 + cc178cf commit 44df793

2 files changed

Lines changed: 16 additions & 52 deletions

File tree

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ on:
77
- "**.go"
88
- go.mod
99
- go.sum
10+
- ".github/licenses.tmpl"
11+
- "script/licenses*"
1012
pull_request:
1113
paths:
1214
- "**.go"
1315
- go.mod
1416
- go.sum
17+
- ".github/licenses.tmpl"
18+
- "script/licenses*"
1519
permissions:
1620
contents: read
1721
jobs:
@@ -46,6 +50,18 @@ jobs:
4650
with:
4751
version: v2.6.0
4852

53+
# actions/setup-go does not setup the installed toolchain to be preferred over the system install,
54+
# which causes go-licenses to raise "Package ... does not have module info" errors.
55+
# For more information, https://github.com/google/go-licenses/issues/244#issuecomment-1885098633
56+
#
57+
# go-licenses has been pinned for automation use.
58+
- name: Check licenses
59+
run: |
60+
export GOROOT=$(go env GOROOT)
61+
export PATH=${GOROOT}/bin:$PATH
62+
go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e # v2.0.1
63+
make licenses-check
64+
4965
# Discover vulnerabilities within Go standard libraries used to build GitHub CLI using govulncheck.
5066
govulncheck:
5167
runs-on: ubuntu-latest

.github/workflows/third-party-licenses.yml

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

0 commit comments

Comments
 (0)