Skip to content

Commit b636f3f

Browse files
chore: add license check CI action (#579)
1 parent 5264ac1 commit b636f3f

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check Licenses
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
check-license:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Repository
10+
uses: actions/checkout@v4
11+
- name: Install Go
12+
uses: actions/setup-go@v5
13+
with:
14+
go-version-file: 'go.mod'
15+
- name: Install go-license
16+
run: go install github.com/palantir/go-license@latest
17+
- name: Check License
18+
run: make check-license

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ FILES := $(shell find . -name "*.go" -not -name "*.pb.go")
6969
license:
7070
@go-license --config .github/license.yml $(FILES)
7171

72+
check-license:
73+
@go-license --config .github/license.yml $(FILES) --verify
74+
7275
format:
7376
@echo "🤖 Running formatter..."
7477
@go run $(gofumpt_cmd) -l -w .

0 commit comments

Comments
 (0)