File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,18 @@ jobs:
64
64
uses : actions/setup-go@v4
65
65
with :
66
66
go-version : 1.20.x
67
+ - name : Checkout code
68
+ uses : actions/checkout@v3
67
69
- name : generate license mirror
68
- run : make mirror-licenses
70
+ run : |
71
+ make mirror-licenses
69
72
- name : lint-licenses
70
73
# if restricted > 0, CI will report an error.
71
- run : make lint-licenses | grep -q 'restricted, [1-9][0-9]*' && exit 1 || true
74
+ run : |
75
+ result=$(make lint-licenses | awk '{print $7}')
76
+ if [ $result -ne 0 ]; then
77
+ exit 1
78
+ fi
72
79
test :
73
80
name : Unit test
74
81
runs-on : ubuntu-22.04
Original file line number Diff line number Diff line change @@ -100,9 +100,9 @@ mod-download-go:
100
100
101
101
.PHONY : mirror-licenses
102
102
mirror-licenses : mod-download-go; \
103
- @ go install istio.io/tools/cmd/license-lint@latest; \
104
- @ rm -fr licenses; \
105
- @ license-lint --mirror
103
+ go install istio.io/tools/cmd/license-lint@latest; \
104
+ rm -fr licenses; \
105
+ license-lint --mirror
106
106
107
107
.PHONY : lint-licenses
108
108
lint-licenses :
You can’t perform that action at this time.
0 commit comments