1515 - " go.sum"
1616
1717env :
18- RUST_VERSION : 1.75 .0
19- GO_VERSION : ' ^1.22.2 '
18+ RUST_VERSION : 1.85 .0
19+ GO_VERSION : ' ^1.22.5 '
2020 CARGO_TERM_COLOR : always
2121 CARGO_INCREMENTAL : " 0"
2222 CARGO_PROFILE_DEV_DEBUG : " 0"
@@ -30,16 +30,11 @@ jobs:
3030 name : General Pull Request Checks
3131 uses : ./.github/workflows/pr_general.yml
3232
33- reviewdog-checks :
34- name : Reviewdog Pull Request Checks
35- uses : ./.github/workflows/pr_reviewdog.yml
36-
3733 check-charts :
3834 name : Helm Chart Check
3935 runs-on : ubuntu-latest
4036 needs :
4137 - general-checks
42- - reviewdog-checks
4338 steps :
4439 - name : Checkout Repository
4540 uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
5752 toolchain : ${{ env.RUST_VERSION }}
5853
5954 - name : Setup Rust Cache
60- uses : Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
55+ uses : Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
6156 with :
6257 key : pr-stackable-cockpit-chart
6358
@@ -69,16 +64,27 @@ jobs:
6964
7065 - name : Helm Charts not up-to-date
7166 if : ${{ failure() }}
72- uses : actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6
67+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
7368 with :
7469 script : |
7570 core.setFailed('Committed Helm charts were not up to date, please regenerate and re-commit!')
7671
7772 publish :
78- name : Publish Docker Image
79- runs-on : ubuntu-latest
73+ name : Publish ${{ matrix.runner.arch }} Image
74+ permissions :
75+ id-token : write
76+ runs-on : ${{ matrix.runner.name }}
77+ strategy :
78+ matrix :
79+ runner :
80+ - {name: "ubuntu-latest", arch: "amd64"}
81+ - {name: "ubicloud-standard-8-arm", arch: "arm64"}
8082 env :
8183 NEXUS_PASSWORD : ${{ secrets.NEXUS_PASSWORD }}
84+ OCI_REGISTRY_SDP_PASSWORD : ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
85+ OCI_REGISTRY_SDP_USERNAME : " robot$sdp+github-action-build"
86+ OCI_REGISTRY_SDP_CHARTS_PASSWORD : ${{ secrets.HARBOR_ROBOT_SDP_CHARTS_GITHUB_ACTION_BUILD_SECRET }}
87+ OCI_REGISTRY_SDP_CHARTS_USERNAME : " robot$sdp-charts+github-action-build"
8288 outputs :
8389 IMAGE_TAG : ${{ steps.printtag.outputs.IMAGE_TAG }}
8490 needs :
@@ -95,12 +101,18 @@ jobs:
95101 with :
96102 toolchain : ${{ env.RUST_VERSION }}
97103
98- - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
104+ - uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
99105 with :
100106 go-version : ${{ env.GO_VERSION }}
101107
108+ - name : Install cosign
109+ uses : sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
110+
111+ - name : Install syft
112+ uses : anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2
113+
102114 - name : Setup Rust Cache
103- uses : Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
115+ uses : Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
104116 with :
105117 key : pr-stackable-cockpit-chart
106118
@@ -121,3 +133,40 @@ jobs:
121133 if : ${{ !github.event.pull_request.head.repo.fork }}
122134 name : Output Image Name and Tag
123135 run : echo "IMAGE_TAG=$(make -e print-docker-tag)" >> "$GITHUB_OUTPUT"
136+
137+ create_manifest_list :
138+ name : Build and publish manifest list
139+ needs :
140+ - publish
141+ runs-on : ubuntu-latest
142+ permissions :
143+ id-token : write
144+ env :
145+ NEXUS_PASSWORD : ${{ secrets.NEXUS_PASSWORD }}
146+ OCI_REGISTRY_SDP_PASSWORD : ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
147+ OCI_REGISTRY_SDP_USERNAME : " robot$sdp+github-action-build"
148+ OCI_REGISTRY_SDP_CHARTS_PASSWORD : ${{ secrets.HARBOR_ROBOT_SDP_CHARTS_GITHUB_ACTION_BUILD_SECRET }}
149+ OCI_REGISTRY_SDP_CHARTS_USERNAME : " robot$sdp-charts+github-action-build"
150+ steps :
151+ - name : Install cosign
152+ uses : sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
153+ - name : Checkout
154+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
155+ with :
156+ submodules : recursive
157+ # This step checks if the current run was triggered by a push to a pr (or a pr being created).
158+ # If this is the case it changes the version of this project in all Cargo.toml files to include the suffix
159+ # "-pr<prnumber>" so that the published artifacts can be linked to this PR.
160+ - uses : stackabletech/cargo-install-action@main
161+ with :
162+ crate : cargo-edit
163+ bin : cargo-set-version
164+ - name : Update version if PR
165+ if : ${{ github.event_name == 'pull_request' }}
166+ run : cargo set-version --offline --package stackable-cockpit 0.0.0-pr${{ github.event.pull_request.number }}
167+ - name : Build manifest list
168+ run : |
169+ # Creating manifest list
170+ make -e docker-manifest-list-build
171+ # Pushing and signing manifest list
172+ make -e docker-manifest-list-publish
0 commit comments