File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,15 @@ jobs:
7979 APP_NAME=${{ steps.extract_version.outputs.MAVEN_NAME }}
8080 APP_VERSION=${{ steps.extract_version.outputs.MAVEN_VERSION }}
8181
82- - name : Install Cosign
82+ - name : install Cosign
8383 if : startsWith(github.ref, 'refs/tags/v')
8484 uses : sigstore/cosign-installer@v3.8.1
8585
86+ - name : write cosign key to file
87+ if : startsWith(github.ref, 'refs/tags/v')
88+ run : |
89+ echo "${{ secrets.COSIGN_PRIVARY_KEY }}" >> cosign.key
90+
8691 - name : sign the published docker image
8792 if : startsWith(github.ref, 'refs/tags/v')
8893 env :
9196 DIGEST : ${{ steps.build-and-push.outputs.digest }}
9297 # This step uses the identity token to provision an ephemeral certificate
9398 # against the sigstore community Fulcio instance.
94- run : cosign sign --yes ghcr.io/your-org/your-image@${DIGEST}
99+ run : |
100+ echo "${TAGS}" | while read tag; do
101+ cosign sign --key cosign.key $tag
102+ done
You can’t perform that action at this time.
0 commit comments