1
- # Copyright (c) 2021 VMware, Inc. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
name : Code Style
16
2
3
+ permissions :
4
+ contents : read
5
+
17
6
on :
18
7
push :
19
- branches : [ 'main' ]
20
-
8
+ branches : main
21
9
pull_request :
22
- branches : [ ' main' ]
10
+ branches : main
23
11
24
12
jobs :
25
13
lint :
@@ -28,13 +16,13 @@ jobs:
28
16
timeout-minutes : 10
29
17
30
18
steps :
31
- - name : Check out code
32
- uses : actions/checkout@v4
19
+ - name : Check Repository
20
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33
21
34
- - name : Set up Go
35
- uses : actions/setup-go@v5
22
+ - name : Setup Go
23
+ uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
36
24
with :
37
- go-version : 1.22
25
+ go-version-file : go.mod
38
26
id : go
39
27
40
28
- name : Go Lint
@@ -52,16 +40,16 @@ jobs:
52
40
# Map between extension and human-readable name.
53
41
include :
54
42
- extension : go
55
- language : Go
43
+ language : go
56
44
57
45
steps :
58
- - name : Check out code
59
- uses : actions/checkout@v4
46
+ - name : Check Repository
47
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60
48
61
- - name : Set up Go
62
- uses : actions/setup-go@v5
49
+ - name : Setup Go
50
+ uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
63
51
with :
64
- go-version : 1.22
52
+ go-version-file : go.mod
65
53
id : go
66
54
67
55
- name : Install Tools
80
68
echo "${TEMP_PATH}" >> "$GITHUB_PATH"
81
69
82
70
- id : boilerplate_txt
83
- uses : andstor/file-existence-action@v3
71
+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
84
72
with :
85
73
files : ./hack/boilerplate/boilerplate.${{ matrix.extension }}.txt
86
74
0 commit comments