File tree Expand file tree Collapse file tree 5 files changed +48
-4
lines changed
Expand file tree Collapse file tree 5 files changed +48
-4
lines changed Original file line number Diff line number Diff line change 25252626 - name : Setup Helm
272728+ - name : Setup Cosign
29+ uses : sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
2830 - name : Login to GitHub Container Registry
29313032 with :
3537 run : make package
3638 - name : Push Helm charts
3739 run : make push
40+ - name : Sign Helm charts
41+ run : make sign
Original file line number Diff line number Diff line change @@ -20,13 +20,16 @@ lint: ## Run Helm linter against all charts.
2020
2121.PHONY : package
2222package : # # Package all Helm charts into the dist directory.
23- mkdir -p dist
24- helm package ./charts/* -d ./dist/
23+ ./scripts/package.sh
2524
2625.PHONY : push
2726push : # # Push all Helm charts to the Helm repository.
2827 ./scripts/push.sh
2928
29+ .PHONY : sign
30+ sign : # # Sign all Helm charts on the Helm repository.
31+ ./scripts/sign.sh
32+
3033.PHONY : plugins
3134plugins : # # Install required Helm plugins.
3235 helm plugin install https://github.com/losisin/helm-values-schema-json.git
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright 2024 Stefan Prodan.
4+ # SPDX-License-Identifier: AGPL-3.0
5+
6+ set -euo pipefail
7+
8+ REPOSITORY_ROOT=$( git rev-parse --show-toplevel)
9+ REGISTRY=" ghcr.io/controlplaneio-fluxcd/charts"
10+
11+ for chartDir in ${REPOSITORY_ROOT} /charts/* ; do
12+ if [ -z " ${chartDir:- } " ]; then
13+ break
14+ fi
15+ chart=$( basename ${chartDir} )
16+ mkdir -p ${REPOSITORY_ROOT} /dist/${chart}
17+ helm package ${chartDir} -d ${REPOSITORY_ROOT} /dist/${chart}
18+ done
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ set -euo pipefail
88REPOSITORY_ROOT=$( git rev-parse --show-toplevel)
99REGISTRY=" ghcr.io/controlplaneio-fluxcd/charts"
1010
11- for pkg in ${REPOSITORY_ROOT} /dist/* ; do
11+ for pkg in ${REPOSITORY_ROOT} /dist/* / * .tgz ; do
1212 if [ -z " ${pkg:- } " ]; then
1313 break
1414 fi
15- helm push " ${pkg} " oci://${REGISTRY}
15+ helm push " ${pkg} " oci://${REGISTRY} | grep Digest: | awk ' {print $NF} ' > " $( dirname ${pkg} ) /digest "
1616done
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright 2024 Stefan Prodan.
4+ # SPDX-License-Identifier: AGPL-3.0
5+
6+ set -euo pipefail
7+
8+ REPOSITORY_ROOT=$( git rev-parse --show-toplevel)
9+ REGISTRY=" ghcr.io/controlplaneio-fluxcd/charts"
10+
11+ for pkg in ${REPOSITORY_ROOT} /dist/* /* .tgz; do
12+ if [ -z " ${pkg:- } " ]; then
13+ break
14+ fi
15+ chart=" $( basename $( dirname ${pkg} ) ) "
16+ digest=" $( cat $( dirname ${pkg} ) /digest) "
17+ image=" ${REGISTRY} /${chart} @${digest} "
18+ cosign sign --yes ${image}
19+ done
You can’t perform that action at this time.
0 commit comments