1919
2020jobs :
2121 build-docker :
22- runs-on : ubuntu-latest
22+ runs-on : ubuntu-22.04
2323 if : github.event_name == 'push'
2424 outputs :
2525 challenge-modified : ${{ steps.set-modified.outputs.challenge-modified }}
3434 matrix :
3535 image : ["challenge", "healthcheck", "gcsfuse", "certbot"]
3636 steps :
37- - uses : actions/checkout@v2
37+ - uses : actions/checkout@v4
3838 with :
3939 fetch-depth : 0
4040
@@ -78,20 +78,20 @@ jobs:
7878 - name : Set up Python
7979 uses : actions/setup-python@v4
8080 with :
81- python-version : ' 3.7 '
81+ python-version : ' 3.13.2 '
8282
8383 - name : ' Set up Cloud SDK auth'
84- uses : ' google-github-actions/auth@v0 '
84+ uses : ' google-github-actions/auth@v1 '
8585 with :
8686 # not using workload identity because we use gsutil
8787 # TODO(evn) switch when supported
8888 # https://github.com/google-github-actions/setup-gcloud#authorization
8989 credentials_json : ' ${{ secrets.GKE_KEY }}'
9090
9191 - name : ' Set up Cloud SDK'
92- uses : ' google-github-actions/setup-gcloud@v0 '
92+ uses : ' google-github-actions/setup-gcloud@v2 '
9393 with :
94- version : ' 319 .0.0'
94+ version : ' 516 .0.0'
9595 service_account_email : ${{ secrets.GKE_EMAIL }}
9696
9797 - name : Configure docker to use the gcloud command-line tool as a credential helper
@@ -109,7 +109,7 @@ jobs:
109109 echo "::set-output name=${{ matrix.image }}-digest::${DIGEST}"
110110
111111 build-operator :
112- runs-on : ubuntu-latest
112+ runs-on : ubuntu-22.04
113113 needs :
114114 - build-docker
115115 if : github.event_name == 'push'
@@ -162,15 +162,15 @@ jobs:
162162 - name : Set up Python
163163 uses : actions/setup-python@v4
164164 with :
165- python-version : ' 3.7 '
165+ python-version : ' 3.13.2 '
166166
167167 - name : Export gcloud related env variable
168168 run : export CLOUDSDK_PYTHON="/usr/bin/python3"
169169
170170 - name : ' Set up Cloud SDK'
171- uses : ' google-github-actions/setup-gcloud@v0 '
171+ uses : ' google-github-actions/setup-gcloud@v2 '
172172 with :
173- version : ' 319 .0.0'
173+ version : ' 516 .0.0'
174174 service_account_email : ${{ secrets.GKE_EMAIL }}
175175
176176 - name : Configure docker to use the gcloud command-line tool as a credential helper
@@ -179,19 +179,23 @@ jobs:
179179 gcloud auth configure-docker
180180
181181 - name : ' Setup go version necessary for operator'
182- uses : actions/setup-go@v2
182+ uses : actions/setup-go@v5
183183 with :
184- go-version : ' 1.16.0 '
184+ go-version : ' 1.24.1 '
185185
186186 - name : Build image
187187 if : steps.modified.outputs.modified
188188 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
189191 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
191193 chmod u+x operator-sdk
192194 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
195199
196200 - id : push
197201 name : Push images
@@ -203,7 +207,9 @@ jobs:
203207 echo "::set-output name=kctf-operator-digest::${DIGEST}"
204208
205209 update-image-and-commit :
206- runs-on : ubuntu-latest
210+ runs-on : ubuntu-22.04
211+ permissions :
212+ contents : write
207213 needs :
208214 - build-docker
209215 - build-operator
@@ -246,7 +252,7 @@ jobs:
246252 if : needs.build-operator.outputs.kctf-operator-modified
247253 run : |
248254 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
250256
251257 - name : Download kubectl
252258 run : |
@@ -257,7 +263,7 @@ jobs:
257263 - name : Set up Python
258264 uses : actions/setup-python@v4
259265 with :
260- python-version : ' 3.7 '
266+ python-version : ' 3.13.2 '
261267
262268 - name : Export gcloud related env variable
263269 run : export CLOUDSDK_PYTHON="/usr/bin/python3"
@@ -271,7 +277,7 @@ jobs:
271277 credentials_json : ' ${{ secrets.GKE_KEY }}'
272278
273279 - name : ' Set up Cloud SDK'
274- uses : ' google-github-actions/setup-gcloud@v0 '
280+ uses : ' google-github-actions/setup-gcloud@v2 '
275281 with :
276282 service_account_email : ${{ secrets.GKE_EMAIL }}
277283 install_components : ' gke-gcloud-auth-plugin'
@@ -334,9 +340,8 @@ jobs:
334340 run : |
335341 # git add returns success for files that exist and haven't been modified
336342 git add kctf-operator/resources/constants.go
337- git add dist/resources/operator .yaml
343+ git add dist/resources/install .yaml
338344 git add kctf-operator/config/crd/bases/kctf.dev_challenges.yaml
339- git add dist/resources/kctf.dev_challenges.yaml
340345 for dir in dist/challenge-templates/* samples/*; do
341346 if [[ ! -e "${dir}/challenge.yaml" ]]; then
342347 continue
0 commit comments