File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1616 contents : write # to push chart release and create a release (helm/chart-releaser-action)
1717 packages : write # needed for ghcr access
1818 id-token : write # needed for keyless signing
19+ attestations : write # needed for artifact attestation
1920 steps :
2021 - name : Checkout
2122 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4950 password : ${{ secrets.GITHUB_TOKEN }}
5051
5152 - name : Push chart to GHCR
53+ id : push-chart
5254 run : |
5355 helm package charts/atlantis
54- helm push atlantis-*.tgz oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts
56+
57+ # Push and capture output to get the OCI digest
58+ PUSH_OUTPUT=$(helm push atlantis-*.tgz oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts 2>&1)
59+
60+ # Extract the OCI digest from helm push output
61+ DIGEST=$(echo "${PUSH_OUTPUT}" | grep -o 'sha256:[a-f0-9]\{64\}')
62+ echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
63+
64+ - name : Attest chart OCI artifact
65+ uses : actions/attest-build-provenance@v3
66+ with :
67+ subject-name : ghcr.io/${{ github.repository_owner }}/charts/atlantis
68+ subject-digest : ${{ steps.push-chart.outputs.digest }}
69+ push-to-registry : true
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apiVersion: v1
33appVersion : v0.36.0
44description : A Helm chart for Atlantis https://www.runatlantis.io
55name : atlantis
6- version : 5.20.2
6+ version : 5.20.3
77keywords :
88 - terraform
99home : https://www.runatlantis.io
You can’t perform that action at this time.
0 commit comments