19
19
20
20
jobs :
21
21
build-docker :
22
- runs-on : ubuntu-latest
22
+ runs-on : ubuntu-22.04
23
23
if : github.event_name == 'push'
24
24
outputs :
25
25
challenge-modified : ${{ steps.set-modified.outputs.challenge-modified }}
34
34
matrix :
35
35
image : ["challenge", "healthcheck", "gcsfuse", "certbot"]
36
36
steps :
37
- - uses : actions/checkout@v2
37
+ - uses : actions/checkout@v4
38
38
with :
39
39
fetch-depth : 0
40
40
@@ -78,20 +78,20 @@ jobs:
78
78
- name : Set up Python
79
79
uses : actions/setup-python@v4
80
80
with :
81
- python-version : ' 3.7 '
81
+ python-version : ' 3.13.2 '
82
82
83
83
- name : ' Set up Cloud SDK auth'
84
- uses : ' google-github-actions/auth@v0 '
84
+ uses : ' google-github-actions/auth@v1 '
85
85
with :
86
86
# not using workload identity because we use gsutil
87
87
# TODO(evn) switch when supported
88
88
# https://github.com/google-github-actions/setup-gcloud#authorization
89
89
credentials_json : ' ${{ secrets.GKE_KEY }}'
90
90
91
91
- name : ' Set up Cloud SDK'
92
- uses : ' google-github-actions/setup-gcloud@v0 '
92
+ uses : ' google-github-actions/setup-gcloud@v2 '
93
93
with :
94
- version : ' 319 .0.0'
94
+ version : ' 516 .0.0'
95
95
service_account_email : ${{ secrets.GKE_EMAIL }}
96
96
97
97
- name : Configure docker to use the gcloud command-line tool as a credential helper
@@ -109,7 +109,7 @@ jobs:
109
109
echo "::set-output name=${{ matrix.image }}-digest::${DIGEST}"
110
110
111
111
build-operator :
112
- runs-on : ubuntu-latest
112
+ runs-on : ubuntu-22.04
113
113
needs :
114
114
- build-docker
115
115
if : github.event_name == 'push'
@@ -162,15 +162,15 @@ jobs:
162
162
- name : Set up Python
163
163
uses : actions/setup-python@v4
164
164
with :
165
- python-version : ' 3.7 '
165
+ python-version : ' 3.13.2 '
166
166
167
167
- name : Export gcloud related env variable
168
168
run : export CLOUDSDK_PYTHON="/usr/bin/python3"
169
169
170
170
- name : ' Set up Cloud SDK'
171
- uses : ' google-github-actions/setup-gcloud@v0 '
171
+ uses : ' google-github-actions/setup-gcloud@v2 '
172
172
with :
173
- version : ' 319 .0.0'
173
+ version : ' 516 .0.0'
174
174
service_account_email : ${{ secrets.GKE_EMAIL }}
175
175
176
176
- name : Configure docker to use the gcloud command-line tool as a credential helper
@@ -179,19 +179,23 @@ jobs:
179
179
gcloud auth configure-docker
180
180
181
181
- name : ' Setup go version necessary for operator'
182
- uses : actions/setup-go@v2
182
+ uses : actions/setup-go@v5
183
183
with :
184
- go-version : ' 1.16.0 '
184
+ go-version : ' 1.24.1 '
185
185
186
186
- name : Build image
187
187
if : steps.modified.outputs.modified
188
188
run : |
189
+ curl -L https://storage.googleapis.com/etcd/v3.5.19/etcd-v3.5.19-linux-amd64.tar.gz -o /tmp/etcd.tar.gz
190
+ sudo tar xzvf /tmp/etcd.tar.gz -C /usr/local/bin/ --strip-components=1
189
191
cd kctf-operator
190
- curl -L https://github.com/operator-framework/operator-sdk/releases/download/v1.15 .0/operator-sdk_linux_amd64 -o operator-sdk
192
+ curl -L https://github.com/operator-framework/operator-sdk/releases/download/v1.36 .0/operator-sdk_linux_amd64 -o operator-sdk
191
193
chmod u+x operator-sdk
192
194
sudo mv operator-sdk /usr/local/bin/
193
- make controller-gen
194
- make manifests docker-build IMG=kctf-operator
195
+ make test
196
+ make docker-build IMG=kctf-operator
197
+ make build-installer IMG=kctf-operator
198
+ mv dist/install.yaml ../dist/resources/install.yaml
195
199
196
200
- id : push
197
201
name : Push images
@@ -203,7 +207,9 @@ jobs:
203
207
echo "::set-output name=kctf-operator-digest::${DIGEST}"
204
208
205
209
update-image-and-commit :
206
- runs-on : ubuntu-latest
210
+ runs-on : ubuntu-22.04
211
+ permissions :
212
+ contents : write
207
213
needs :
208
214
- build-docker
209
215
- build-operator
@@ -246,7 +252,7 @@ jobs:
246
252
if : needs.build-operator.outputs.kctf-operator-modified
247
253
run : |
248
254
IMAGE="gcr.io/${{ secrets.GCR_PROJECT }}/kctf-operator@${{ needs.build-operator.outputs.kctf-operator-digest }}"
249
- sed -i "s#image: .*kctf-operator.*#image: ${IMAGE}#" dist/resources/operator .yaml
255
+ sed -i "s#image: .*kctf-operator.*#image: ${IMAGE}#" dist/resources/install .yaml
250
256
251
257
- name : Download kubectl
252
258
run : |
@@ -257,7 +263,7 @@ jobs:
257
263
- name : Set up Python
258
264
uses : actions/setup-python@v4
259
265
with :
260
- python-version : ' 3.7 '
266
+ python-version : ' 3.13.2 '
261
267
262
268
- name : Export gcloud related env variable
263
269
run : export CLOUDSDK_PYTHON="/usr/bin/python3"
@@ -271,7 +277,7 @@ jobs:
271
277
credentials_json : ' ${{ secrets.GKE_KEY }}'
272
278
273
279
- name : ' Set up Cloud SDK'
274
- uses : ' google-github-actions/setup-gcloud@v0 '
280
+ uses : ' google-github-actions/setup-gcloud@v2 '
275
281
with :
276
282
service_account_email : ${{ secrets.GKE_EMAIL }}
277
283
install_components : ' gke-gcloud-auth-plugin'
@@ -334,9 +340,8 @@ jobs:
334
340
run : |
335
341
# git add returns success for files that exist and haven't been modified
336
342
git add kctf-operator/resources/constants.go
337
- git add dist/resources/operator .yaml
343
+ git add dist/resources/install .yaml
338
344
git add kctf-operator/config/crd/bases/kctf.dev_challenges.yaml
339
- git add dist/resources/kctf.dev_challenges.yaml
340
345
for dir in dist/challenge-templates/* samples/*; do
341
346
if [[ ! -e "${dir}/challenge.yaml" ]]; then
342
347
continue
0 commit comments