@@ -2,51 +2,22 @@ name: "Validations"
22on :
33 workflow_dispatch :
44 push :
5+ branches :
6+ - main
57 pull_request :
68
79permissions :
810 contents : read
911
10- env :
11- GO_VERSION : " 1.17.x"
12-
1312jobs :
1413
1514 Static-Analysis :
1615 # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
1716 name : " Static analysis"
1817 runs-on : ubuntu-24.04
1918 steps :
20- - uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
21- with :
22- go-version : ${{ env.GO_VERSION }}
23-
24- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25- with :
26- persist-credentials : false
27-
28- - name : Restore tool cache
29- id : tool-cache
30- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
31- with :
32- path : ${{ github.workspace }}/.tmp
33- key : ${{ runner.os }}-tool-${{ hashFiles('Makefile') }}
34-
35- - name : Restore go cache
36- id : go-cache
37- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
38- with :
39- path : ~/go/pkg/mod
40- key : ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
41- restore-keys : |
42- ${{ runner.os }}-go-${{ env.GO_VERSION }}-
43-
44- - name : (cache-miss) Bootstrap all project dependencies
45- if : steps.tool-cache.outputs.cache-hit != 'true' || steps.go-cache.outputs.cache-hit != 'true'
46- run : make bootstrap
47-
48- - name : Bootstrap CI environment dependencies
49- run : make ci-bootstrap
19+ # setup checkout, go, go-make, binny, and cache go modules
20+ - uses : anchore/go-make/.github/actions/setup@383ef7852b8ae43a30f424896b52479186d2ea4d # v0.1.0
5021
5122 - name : Run static analysis
5223 run : make static-analysis
5627 name : " Unit tests"
5728 runs-on : ubuntu-24.04
5829 steps :
59- - uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
60- with :
61- go-version : ${{ env.GO_VERSION }}
62-
6330 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6431 with :
6532 lfs : true
6835 - name : Checkout LFS objects
6936 run : git lfs checkout
7037
71- - name : Restore tool cache
72- id : tool-cache
73- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
74- with :
75- path : ${{ github.workspace }}/.tmp
76- key : ${{ runner.os }}-tool-${{ hashFiles('Makefile') }}
77-
78- - name : Restore go cache
79- id : go-cache
80- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
81- with :
82- path : ~/go/pkg/mod
83- key : ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
84- restore-keys : |
85- ${{ runner.os }}-go-${{ env.GO_VERSION }}-
86-
87- - name : (cache-miss) Bootstrap all project dependencies
88- if : steps.tool-cache.outputs.cache-hit != 'true' || steps.go-cache.outputs.cache-hit != 'true'
89- run : make bootstrap
90-
91- - name : Bootstrap CI environment dependencies
92- run : make ci-bootstrap
38+ # setup go, go-make, binny, and cache go modules
39+ - uses : anchore/go-make/.github/actions/setup@383ef7852b8ae43a30f424896b52479186d2ea4d # v0.1.0
9340
9441 - name : Run unit tests
9542 run : make unit
0 commit comments