Skip to content

Commit 4888461

Browse files
committed
add artifact attestation
Signed-off-by: drfaust92 <[email protected]>
1 parent b795cff commit 4888461

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/release.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
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
@@ -49,6 +50,20 @@ jobs:
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

charts/atlantis/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
appVersion: v0.36.0
44
description: A Helm chart for Atlantis https://www.runatlantis.io
55
name: atlantis
6-
version: 5.20.2
6+
version: 5.20.3
77
keywords:
88
- terraform
99
home: https://www.runatlantis.io

0 commit comments

Comments
 (0)