42
42
with :
43
43
packages : protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
44
44
version : 1.0
45
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
45
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
46
46
with :
47
47
submodules : recursive
48
48
- uses : dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
@@ -111,7 +111,7 @@ jobs:
111
111
continue-on-error : ${{ matrix.checks == 'advisories' }}
112
112
113
113
steps :
114
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
114
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
115
115
with :
116
116
submodules : recursive
117
117
- uses : EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868 # v1.6.3
@@ -122,7 +122,7 @@ jobs:
122
122
name : Run Rustfmt
123
123
runs-on : ubuntu-latest
124
124
steps :
125
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
125
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
126
126
with :
127
127
submodules : recursive
128
128
- uses : dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
@@ -140,7 +140,7 @@ jobs:
140
140
with :
141
141
packages : protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
142
142
version : 1.0
143
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
143
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
144
144
with :
145
145
submodules : recursive
146
146
- uses : dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
@@ -175,8 +175,7 @@ jobs:
175
175
with :
176
176
packages : protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
177
177
version : 1.0
178
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
179
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
178
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
180
179
with :
181
180
submodules : recursive
182
181
- uses : dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
@@ -198,7 +197,7 @@ jobs:
198
197
with :
199
198
packages : protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
200
199
version : 1.0
201
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
200
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
202
201
with :
203
202
submodules : recursive
204
203
- uses : dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
@@ -218,11 +217,10 @@ jobs:
218
217
name : Check if committed README is the one we would render from the available parts
219
218
runs-on : ubuntu-latest
220
219
steps :
221
- - name : Checkout
222
- uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
220
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
223
221
with :
224
222
submodules : recursive
225
- - uses : actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # tag= v5.1.0
223
+ - uses : actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
226
224
with :
227
225
python-version : ' 3.12'
228
226
- name : Install jinja2-cli
@@ -257,8 +255,7 @@ jobs:
257
255
with :
258
256
packages : protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
259
257
version : 1.0
260
- - name : Checkout
261
- uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
258
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
262
259
with :
263
260
submodules : recursive
264
261
- name : Set up Helm
@@ -301,11 +298,14 @@ jobs:
301
298
run : echo All tests have passed!
302
299
303
300
package_and_publish :
304
- name : Package Charts, Build Docker Image and publish them
301
+ name : Package Charts, Build Docker Image and publish them - ${{ matrix.runner }}
305
302
needs :
306
303
- tests_passed
307
304
- select_helm_repo
308
- runs-on : ubuntu-latest
305
+ strategy :
306
+ matrix :
307
+ runner : ["ubuntu-latest", "buildjet-2vcpu-ubuntu-2204-arm"]
308
+ runs-on : ${{ matrix.runner }}
309
309
permissions :
310
310
id-token : write
311
311
env :
@@ -324,11 +324,10 @@ jobs:
324
324
with :
325
325
packages : protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
326
326
version : 1.0
327
- - name : Checkout
328
- uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
327
+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
329
328
with :
330
329
submodules : recursive
331
- - uses : cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # tag= v26
330
+ - uses : cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
332
331
- uses : dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
333
332
with :
334
333
toolchain : ${{ env.RUST_TOOLCHAIN_VERSION }}
@@ -344,15 +343,25 @@ jobs:
344
343
if : ${{ github.event_name == 'pull_request' }}
345
344
run : cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
346
345
347
- # Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
348
- # default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
349
- # This is needed for the HELM_REPO variable.
346
+ # Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
347
+ # default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
348
+ # This is needed for the HELM_REPO variable.
350
349
- name : Install cosign
351
- uses : sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # tag= v3.5.0
350
+ uses : sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
352
351
- name : Install syft
353
352
uses : anchore/sbom-action/download-syft@7ccf588e3cf3cc2611714c2eeae48550fbc17552 # v0.15.11
354
353
- name : Build Docker image and Helm chart
355
- run : make -e build
354
+ run : |
355
+ # Installing helm on BuildJet only
356
+ if [ "$(arch)" = "aarch64" ]; then
357
+ curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
358
+ sudo apt-get -y install apt-transport-https --yes
359
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
360
+ sudo apt-get -y update
361
+ sudo apt-get -y install helm
362
+ fi
363
+
364
+ make -e build
356
365
- name : Publish Docker image and Helm chart
357
366
if : ${{ !github.event.pull_request.head.repo.fork }}
358
367
run : make -e publish
@@ -362,10 +371,48 @@ jobs:
362
371
if : ${{ !github.event.pull_request.head.repo.fork }}
363
372
run : echo "IMAGE_TAG=$(make -e print-docker-tag)" >> $GITHUB_OUTPUT
364
373
374
+ create_manifest_list :
375
+ name : Build and publish manifest list
376
+ needs :
377
+ - package_and_publish
378
+ runs-on : ubuntu-latest
379
+ permissions :
380
+ id-token : write
381
+ env :
382
+ NEXUS_PASSWORD : ${{ secrets.NEXUS_PASSWORD }}
383
+ OCI_REGISTRY_SDP_PASSWORD : ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
384
+ OCI_REGISTRY_SDP_USERNAME : " robot$sdp+github-action-build"
385
+ OCI_REGISTRY_SDP_CHARTS_PASSWORD : ${{ secrets.HARBOR_ROBOT_SDP_CHARTS_GITHUB_ACTION_BUILD_SECRET }}
386
+ OCI_REGISTRY_SDP_CHARTS_USERNAME : " robot$sdp-charts+github-action-build"
387
+ steps :
388
+ - name : Install cosign
389
+ uses : sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
390
+ - name : Checkout
391
+ uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
392
+ with :
393
+ submodules : recursive
394
+ # This step checks if the current run was triggered by a push to a pr (or a pr being created).
395
+ # If this is the case it changes the version of this project in all Cargo.toml files to include the suffix
396
+ # "-pr<prnumber>" so that the published artifacts can be linked to this PR.
397
+ - uses : stackabletech/cargo-install-action@main
398
+ with :
399
+ crate : cargo-edit
400
+ bin : cargo-set-version
401
+ - name : Update version if PR
402
+ if : ${{ github.event_name == 'pull_request' }}
403
+ run : cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
404
+ - name : Build manifest list
405
+ run : |
406
+ # Creating manifest list
407
+ make -e docker-manifest-list-build
408
+ # Pushing and signing manifest list
409
+ make -e docker-manifest-list-publish
410
+
365
411
openshift_preflight :
366
412
name : Run the OpenShift Preflight check on the published images
367
413
if : ${{ !github.event.pull_request.head.repo.fork }}
368
414
needs :
415
+ - create_manifest_list
369
416
- package_and_publish
370
417
runs-on : ubuntu-latest
371
418
env :
@@ -380,4 +427,4 @@ jobs:
380
427
ARCH_FOR_PREFLIGHT="$(arch | sed -e 's#x86_64#amd64#' | sed -e 's#aarch64#arm64#')"
381
428
./preflight-linux-amd64 check container "$IMAGE_TAG" --platform "${ARCH_FOR_PREFLIGHT}" > preflight.out
382
429
- name : " Passed?"
383
- run : ' [ "$(./preflight-linux-amd64 check container "$IMAGE_TAG" --platform "${ARCH_FOR_PREFLIGHT}" | jq -r .passed)" == true ]'
430
+ run : ' [ "$(cat preflight.out | jq -r .passed)" == true ]'
0 commit comments