@@ -4,115 +4,61 @@ name: Check
44on :
55 pull_request :
66 branches :
7- - main
8- - release-*
7+ - main
8+ - release-*
99 push :
1010 branches :
11- - main
12- - release-*
11+ - main
12+ - release-*
1313
1414env :
15- GO_VERSION : ' 1.19 '
15+ GO_VERSION : ' 1.23 '
1616
1717jobs :
1818
1919 # Test:
2020 # name: Unit Test
21- # runs-on: ubuntu-20.04
21+ # runs-on: ubuntu-latest
2222 # steps:
23- # - uses: actions/checkout@v3
24- # with:
25- # submodules: true
26- # - name: Fetch History
27- # run: git fetch --prune --unshallow
28- # - name: Setup Go
29- # uses: actions/setup-go@v3
30- # with:
31- # go-version: ${{ env.GO_VERSION }}
32- # - name: Cache Go Dependencies
33- # uses: actions/cache@v2
34- # with:
35- # path: ~/go/pkg/mod
36- # key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
37- # restore-keys: ${{ runner.os }}-go-
38- # - name: Run Unit Tests
39- # run: |
40- # make test
41- # git status
42- # # TODO: enable after public
43- # # - name: Publish Unit Test Coverage
44- # # uses: codecov/codecov-action@v3
45- # # with:
46- # # flags: unittests
47- # # file: cover.out
48- # - name: Check diff
49- # run: '[[ -z $(git status -s) ]] || (printf "Existing modified/untracked files.\nPlease run \"make generate manifests fmt vet\" and push again.\n"; exit 1)'
23+ # - uses: actions/checkout@v4
24+ # - name: Set up Go
25+ # uses: actions/setup-go@v5
26+ # with:
27+ # go-version: ${{ env.GO_VERSION }}
28+ # check-latest: true
29+ # cache-dependency-path: "**/*.sum"
30+ # - name: Run Unit Tests
31+ # run: |
32+ # make test
33+ # git status
5034
5135 GolangLint :
5236 name : Golang Lint
5337 runs-on : ubuntu-latest
5438 steps :
55- - name : Checkout
56- uses : actions/checkout@v3
57- with :
58- fetch-depth : 0
59- - name : Set up Go
60- uses : actions/setup-go@v4
61- with :
62- go-version : ${{ env.GO_VERSION }}
63- cache : false
64- - name : golangci-lint
65- uses : golangci/golangci-lint-action@v3
66- with :
67- # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
68- version : v1.53
69- args : --timeout=30m
70-
71- # Lints Pull Request commits with commitlint.
72- #
73- # Rules can be referenced:
74- # https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
75- # CommitLint:
76- # name: Commit Lint
77- # runs-on: ubuntu-latest
78- # if: contains(fromJSON('["pull_request"]'), github.event_name)
79- # steps:
80- # - name: Checkout
81- # uses: actions/checkout@v3
82- # with:
83- # fetch-depth: 0
84- # - uses: wagoid/commitlint-github-action@v5
85-
86- # Lints Pull Request title, because the title will be used as the
87- # commit message in branch main.
88- #
89- # Configuration detail can be referenced:
90- # https://github.com/marketplace/actions/pull-request-title-rules
91-
92- # PullRequestTitleLint:
93- # name: Pull Request Title Lint
94- # runs-on: ubuntu-latest
95- # if: contains(fromJSON('["pull_request"]'), github.event_name)
96- # steps:
97- # - uses: deepakputhraya/action-pr-title@master
98- # with:
99- # allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test' # title should start with the given prefix
100- # disallowed_prefixes: 'WIP,[WIP]' # title should not start with the given prefix
101- # prefix_case_sensitive: false # title prefix are case insensitive
102- # min_length: 5 # Min length of the title
103- # max_length: 80 # Max length of the title
104- # github_token: ${{ github.token }} # Default: ${{ github.token }}
39+ - name : Checkout
40+ uses : actions/checkout@v4
41+ - name : Set up Go
42+ uses : actions/setup-go@v5
43+ with :
44+ go-version : ${{ env.GO_VERSION }}
45+ check-latest : true
46+ cache-dependency-path : " **/*.sum"
47+ - name : golangci-lint
48+ uses : golangci/golangci-lint-action@v7
49+ with :
50+ # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
51+ version : v2.0.2
52+ args : --timeout=30m
10553
10654 LicenseCheck :
10755 name : License Check
10856 runs-on : ubuntu-latest
10957 env :
11058 TERM : xterm
11159 steps :
112- - uses : actions/checkout@v3
113- with :
114- fetch-depth : 0
115- - uses : apache/skywalking-eyes@main
60+ - uses : actions/checkout@v4
61+ - uses : apache/skywalking-eyes@main
11662
11763 # The TruffleHog OSS Github Action can be used to scan a range of commits for leaked credentials. The action will fail if any results are found.
11864 # More see: https://github.com/marketplace/actions/trufflehog-oss
@@ -121,30 +67,14 @@ jobs:
12167 name : Secret Scan
12268 runs-on : ubuntu-latest
12369 steps :
124- - name : Checkout
125- uses : actions/checkout@v3
126- with :
127- fetch-depth : 0
128- - name : TruffleHog OSS
129- uses : trufflesecurity/trufflehog@main
130- with :
131- path : ./
132- base : ${{ github.event.repository.default_branch }}
133- head : HEAD
134- extra_args : --debug --json
135-
136- # TODO: Uncomment when the repository is publicly.
137- # DependencyReview:
138- # permissions:
139- # actions: read
140- # contents: read
141- # security-events: write
142- # name: Dependency Review
143- # runs-on: ubuntu-latest
144- # steps:
145- # - uses: actions/checkout@v3
146- # with:
147- # fetch-depth: 0
148- # - uses: actions/dependency-review-action@v3
149- # with:
150- # fail-on-severity: critical
70+ - name : Checkout
71+ uses : actions/checkout@v3
72+ with :
73+ fetch-depth : 0
74+ - name : TruffleHog OSS
75+ uses : trufflesecurity/trufflehog@main
76+ with :
77+ path : ./
78+ base : ${{ github.event.repository.default_branch }}
79+ head : HEAD
80+ extra_args : --debug --json
0 commit comments