File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,6 @@ materials:
4242 - type : ARTIFACT
4343 name : cli-darwin-amd64
4444 output : true
45+ - type : ARTIFACT
46+ name : source-code
47+ output : true
Original file line number Diff line number Diff line change 2727 CHAINLOOP_ROBOT_ACCOUNT : ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT }}
2828 CONTAINER_IMAGE_CP : ghcr.io/chainloop-dev/chainloop/control-plane:${{ github.ref_name }}
2929 CONTAINER_IMAGE_CAS : ghcr.io/chainloop-dev/chainloop/artifact-cas:${{ github.ref_name }}
30+ GH_TOKEN : ${{ github.token }}
3031 steps :
3132 - name : Install Cosign
3233 uses : sigstore/cosign-installer@ef6a6b364bbad08abd36a5f8af60b595d12702f8 # main
@@ -112,6 +113,16 @@ jobs:
112113 chainloop attestation add --name ${BINARY_NAME} --value ${BINARY_PATH} || true
113114 done
114115
116+ - name : Add Attestation Artifacts (source code)
117+ run : |
118+ # When the trigger of the action is a release, github.ref contains refs/tags/<tag_name>
119+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
120+
121+ tag=$(echo -n ${{github.ref}} | cut -d / -f3)
122+ version=$(echo -n $tag | sed 's/v//g')
123+ gh release download $tag -A tar.gz -D /tmp
124+ chainloop attestation add --name source-code --value "/tmp/chainloop-$version.tar.gz"
125+
115126 - name : Finish and Record Attestation
116127 if : ${{ success() }}
117128 run : |
You can’t perform that action at this time.
0 commit comments