From d9ebd1257b51c5208c74c8ff66e9722b4291c35d Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Tue, 4 Jun 2024 13:39:05 -0600 Subject: [PATCH 1/2] use crane to fetch digest Signed-off-by: Meredith Lancaster --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69f2cdb..f372fb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,9 +42,7 @@ jobs: - name: Get pushed chart digest id: get-digest run: | - # helm show chart prints the digest to stderr, so redirect stderr and - # extract the digest from the output - digest=$(helm show chart oci://${{ env.REGISTRY }}/${{ github.repository }}/${{ steps.release-details.outputs.chart_name }} --version ${{ steps.release-details.outputs.chart_version }} 2>&1 | grep "^Digest" | sed 's/^Digest: //') + digest=$(crane digest ${{ env.REGISTRY }}/${{ env.repository }}/${{ steps.release-details.outputs.chart_name }}:${{ steps.release-details.outputs.chart_version }}) echo digest=$digest >> $GITHUB_OUTPUT - name: Attest uses: actions/attest-build-provenance@173725a1209d09b31f9d30a3890cf2757ebbff0d # v1.1.2 From c3267408ae8a77974f36576c979fcca65779353b Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Wed, 5 Jun 2024 13:03:12 -0600 Subject: [PATCH 2/2] install crane Signed-off-by: Meredith Lancaster --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f372fb2..e7da9d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push packaged chart to GHCR run: helm push ${{ github.ref_name }}.tgz oci://${{ env.REGISTRY }}/${{ github.repository }} + - uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c # v0.3 - name: Get pushed chart digest id: get-digest run: |