This repository was archived by the owner on May 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +86
-0
lines changed
Expand file tree Collapse file tree 2 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Generated Files
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+
11+ gomod :
12+ name : Go Modules
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+
18+ - name : Set up Go
19+ uses : actions/setup-go@v2
20+ with :
21+ go-version : ' 1.17'
22+
23+ - name : Go caches
24+ uses : actions/cache@v2
25+ with :
26+ path : |
27+ ~/go/pkg/mod
28+ key : ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29+ restore-keys : |
30+ ${{ github.job }}-${{ runner.os }}-go-
31+
32+ - name : Check modules requirements
33+ run : |
34+ go mod tidy
35+
36+ git_status="$(git status --porcelain)"
37+ if [[ ${git_status} ]]; then
38+ echo -e 'Go modules are out-of-date. Please run `go mod tidy`\n'
39+ echo "${git_status}"
40+ exit 1
41+ fi
Original file line number Diff line number Diff line change 1+ name : OSS Licenses
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+
11+ vendor :
12+ name : Third-Party Licenses
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+
18+ - name : Set up Go
19+ uses : actions/setup-go@v2
20+ with :
21+ go-version : ' 1.17'
22+
23+ - name : Go caches
24+ uses : actions/cache@v2
25+ with :
26+ path : |
27+ ~/.cache/go-build
28+ ~/go/pkg/mod
29+ key : ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
30+ restore-keys : |
31+ ${{ github.job }}-${{ runner.os }}-go-
32+
33+ - name : Install go-licenses
34+ run : go install github.com/google/go-licenses@latest
35+
36+ - name : Check third-party licenses
37+ run : |
38+ go-licenses save ./... --save_path LICENSES/vendor/ --force
39+
40+ git_status="$(git status --porcelain)"
41+ if [[ ${git_status} ]]; then
42+ echo -e 'Third-party licenses are out-of-date. Please run `go-licenses save`\n'
43+ echo "${git_status}"
44+ exit 1
45+ fi
You can’t perform that action at this time.
0 commit comments