File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 99 release :
1010 permissions :
1111 contents : write
12- packages : write
12+ packages : write # for pushing to GHCR
13+ id-token : write # for signing with cosign
1314 runs-on : ubuntu-latest
1415 steps :
1516 - name : Checkout
1617 uses : actions/checkout@v5
1718 with :
1819 fetch-depth : 0
1920
21+ - name : Setup Cosign
22+ 23+
2024 - name : Configure Git
2125 run : |
2226 git config user.name "$GITHUB_ACTOR"
@@ -42,12 +46,15 @@ jobs:
4246 username : ${{ github.actor }}
4347 password : ${{ secrets.GITHUB_TOKEN }}
4448
45- - name : Push Charts to GHCR
49+ - name : Push Charts to GHCR and Sign
4650 run : |
4751 shopt -s nullglob
4852 for pkg in .cr-release-packages/*; do
4953 if [ -z "${pkg:-}" ]; then
5054 break
5155 fi
52- helm push "${pkg}" oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts
56+ chart_name=$(echo "${pkg##*/}" | sed 's/-[0-9].*$//')
57+ repo="oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"
58+ helm push "${pkg}" "${repo}" |& grep Digest: | awk '{print $NF}' > digest.txt
59+ cosign sign --yes "${repo}/${chart_name}@$(cat digest.txt)"
5360 done
You can’t perform that action at this time.
0 commit comments