1717 runs-on : ubuntu-latest
1818 permissions :
1919 packages : write
20+ env :
21+ CHAINLOOP_VERSION : 0.83.0 # Min version that includes HELM_CHART material type
22+ CHAINLOOP_ROBOT_ACCOUNT : ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_CHART_PACKAGE }}
2023 steps :
24+ - name : Install Chainloop
25+ run : |
26+ curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/01ad13af08950b7bfbc83569bea207aeb4e1a285/docs/static/install.sh | bash -s -- --version v${{ env.CHAINLOOP_VERSION }}
27+
2128 - name : Docker login to Github Packages
2229 uses : docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
2330 with :
@@ -30,11 +37,38 @@ jobs:
3037
3138 - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3239
40+ - name : Initialize Attestation
41+ run : |
42+ chainloop attestation init
43+
3344 - name : Package Chart
3445 run : helm package deployment/chainloop/
3546
47+ - name : Add Attestation (Helm Chart)
48+ run : |
49+ chainloop attestation add --name helm-chart --value chainloop*.tgz
50+
3651 - name : Push Chart
3752 run : |
3853 for pkg in chainloop*.tgz; do
3954 helm push ${pkg} oci://ghcr.io/chainloop-dev/charts
4055 done
56+
57+ - name : Finish and Record Attestation
58+ if : ${{ success() }}
59+ run : |
60+ chainloop attestation status --full
61+ chainloop attestation push --key env://CHAINLOOP_SIGNING_KEY
62+ env :
63+ CHAINLOOP_SIGNING_PASSWORD : ${{ secrets.COSIGN_PASSWORD }}
64+ CHAINLOOP_SIGNING_KEY : ${{ secrets.COSIGN_KEY }}
65+
66+ - name : Mark attestation as failed
67+ if : ${{ failure() }}
68+ run : |
69+ chainloop attestation reset
70+
71+ - name : Mark attestation as cancelled
72+ if : ${{ cancelled() }}
73+ run : |
74+ chainloop attestation reset --trigger cancellation
0 commit comments