22
22
uses : actions/setup-go@v5
23
23
with :
24
24
go-version-file : ' ${{ github.workspace }}/go.mod'
25
+ cache : false
26
+
27
+ - name : Get go environment for use with cache
28
+ run : |
29
+ echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
30
+ echo "go_modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
31
+ - name : Set up cache
32
+ # https://github.com/actions/setup-go/issues/358 - cache is not working with setup-go for multiple jobs
33
+ uses : actions/cache@v4
34
+ with :
35
+ path : |
36
+ ${{ env.go_cache }}
37
+ ${{ env.go_modcache }}
38
+ key : ${{ env.cache_name }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }}
39
+ restore-keys : |
40
+ ${{ env.cache_name }}-${{ runner.os }}-go-
41
+ env :
42
+ cache_name : cli-go-cache
43
+
25
44
- name : CTF
26
45
run : |
27
46
cd components/ocmcli
37
56
uses : actions/setup-go@v5
38
57
with :
39
58
go-version-file : ' ${{ github.workspace }}/go.mod'
59
+ cache : false
60
+
61
+ - name : Get go environment for use with cache
62
+ run : |
63
+ echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
64
+ echo "go_modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
65
+ - name : Set up cache
66
+ # https://github.com/actions/setup-go/issues/358 - cache is not working with setup-go for multiple jobs
67
+ uses : actions/cache@v4
68
+ with :
69
+ path : |
70
+ ${{ env.go_cache }}
71
+ ${{ env.go_modcache }}
72
+ key : ${{ env.cache_name }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }}
73
+ restore-keys : |
74
+ ${{ env.cache_name }}-${{ runner.os }}-go-
75
+ env :
76
+ cache_name : helminstaller-go-cache
77
+
40
78
- name : CTF
41
79
run : |
42
80
cd components/helminstaller
52
90
uses : actions/setup-go@v5
53
91
with :
54
92
go-version-file : ' ${{ github.workspace }}/go.mod'
93
+ cache : false
94
+
95
+ - name : Get go environment for use with cache
96
+ run : |
97
+ echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
98
+ echo "go_modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
99
+ - name : Set up cache
100
+ # https://github.com/actions/setup-go/issues/358 - cache is not working with setup-go for multiple jobs
101
+ uses : actions/cache@v4
102
+ with :
103
+ path : |
104
+ ${{ env.go_cache }}
105
+ ${{ env.go_modcache }}
106
+ key : ${{ env.cache_name }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }}
107
+ restore-keys : |
108
+ ${{ env.cache_name }}-${{ runner.os }}-go-
109
+ env :
110
+ cache_name : helmdemo-go-cache
111
+
55
112
- name : CTF
56
113
run : |
57
114
cd components/helmdemo
@@ -67,6 +124,25 @@ jobs:
67
124
uses : actions/setup-go@v5
68
125
with :
69
126
go-version-file : ' ${{ github.workspace }}/go.mod'
127
+ cache : false
128
+
129
+ - name : Get go environment for use with cache
130
+ run : |
131
+ echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
132
+ echo "go_modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
133
+ - name : Set up cache
134
+ # https://github.com/actions/setup-go/issues/358 - cache is not working with setup-go for multiple jobs
135
+ uses : actions/cache@v4
136
+ with :
137
+ path : |
138
+ ${{ env.go_cache }}
139
+ ${{ env.go_modcache }}
140
+ key : ${{ env.cache_name }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }}
141
+ restore-keys : |
142
+ ${{ env.cache_name }}-${{ runner.os }}-go-
143
+ env :
144
+ cache_name : helm-subchart-go-cache
145
+
70
146
- name : CTF
71
147
run : |
72
148
cd components/subchartsdemo
@@ -85,6 +161,25 @@ jobs:
85
161
uses : actions/setup-go@v5
86
162
with :
87
163
go-version-file : ' ${{ github.workspace }}/go.mod'
164
+ cache : false
165
+
166
+ - name : Get go environment for use with cache
167
+ run : |
168
+ echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
169
+ echo "go_modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
170
+ - name : Set up cache
171
+ # https://github.com/actions/setup-go/issues/358 - cache is not working with setup-go for multiple jobs
172
+ uses : actions/cache@v4
173
+ with :
174
+ path : |
175
+ ${{ env.go_cache }}
176
+ ${{ env.go_modcache }}
177
+ key : ${{ env.cache_name }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }}
178
+ restore-keys : |
179
+ ${{ env.cache_name }}-${{ runner.os }}-go-
180
+ env :
181
+ cache_name : ecr-plugin-go-cache
182
+
88
183
- name : CTF
89
184
run : |
90
185
cd components/ecrplugin
0 commit comments