Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
permissions:
contents: read
env:
# renovate: datasource=go depName=github.com/google/go-licenses
GO_LICENSES_VERSION: v1.6.0
# renovate: datasource=go depName=github.com/google/go-licenses/v2
GO_LICENSES_VERSION: v2.0.1
REPORT_FILE: gl-license-scanning-report.json

steps:
Expand All @@ -71,13 +71,22 @@ jobs:
with:
go-version-file: go.mod
cache: false
- name: Verify MIT-0 license unsupported by go-licenses
run: |
go mod download github.com/segmentio/asm
printf '%s %s\n' \
cca993712df289a5958bdef69031a5dac0f951ac15afeb313f9eeea55ed59443 \
"$(go list -m -f '{{.Dir}}/LICENSE' github.com/segmentio/asm)" |
sha256sum --check
- name: License scanning
run: |
scripts/install-go-tool.sh "github.com/google/go-licenses@${GO_LICENSES_VERSION}"
go-licenses check . --disallowed_types=forbidden,restricted
scripts/install-go-tool.sh "github.com/google/go-licenses/v2@${GO_LICENSES_VERSION}"
go-licenses check . --disallowed_types=forbidden,restricted --ignore=github.com/segmentio/asm/
- name: Generate license report
run: |
go-licenses report . > licenses.csv
go-licenses report . --ignore=github.com/segmentio/asm/ > licenses.csv
printf 'github.com/segmentio/asm,https://github.com/segmentio/asm/blob/%s/LICENSE,MIT-0\n' \
"$(go list -m -f '{{.Version}}' github.com/segmentio/asm)" >> licenses.csv
- name: Save license scan report
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"matchPackageNames": [
"golangci/golangci-lint",
"goreleaser/goreleaser",
"github.com/google/go-licenses",
"github.com/google/go-licenses/v2",
"golang.org/x/vuln"
],
"matchUpdateTypes": ["patch", "minor", "digest", "pin", "pinDigest"],
Expand Down
2 changes: 1 addition & 1 deletion scripts/renovate-config-test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ async function main() {
];
for (const name of [
'golangci/golangci-lint', 'goreleaser/goreleaser',
'github.com/google/go-licenses', 'golang.org/x/vuln',
'github.com/google/go-licenses/v2', 'golang.org/x/vuln',
]) {
const dep = extracted.find(dep => (dep.packageName ?? dep.depName) === name);
assert(dep, `Missing CI tool extraction: ${name}`);
Expand Down
Loading