File tree Expand file tree Collapse file tree 2 files changed +244
-250
lines changed
Expand file tree Collapse file tree 2 files changed +244
-250
lines changed Original file line number Diff line number Diff line change 1+ name : linux-code-sign
2+ description : Sign Linux artifacts with cosign.
3+ inputs :
4+ target :
5+ description : Target triple for the artifacts to sign.
6+ required : true
7+
8+ runs :
9+ using : composite
10+ steps :
11+ - name : Install cosign
12+ uses : sigstore/cosign-installer@v3.7.0
13+
14+ - name : Cosign Linux artifacts
15+ shell : bash
16+ env :
17+ COSIGN_EXPERIMENTAL : " 1"
18+ COSIGN_YES : " true"
19+ COSIGN_OIDC_CLIENT_ID : " sigstore"
20+ COSIGN_OIDC_ISSUER : " https://oauth2.sigstore.dev/auth"
21+ run : |
22+ set -euo pipefail
23+
24+ dest="dist/${{ inputs.target }}"
25+ if [[ ! -d "$dest" ]]; then
26+ echo "Destination $dest does not exist"
27+ exit 1
28+ fi
29+
30+ shopt -s nullglob
31+ for artifact in "$dest"/*; do
32+ if [[ -f "$artifact" ]]; then
33+ cosign sign-blob \
34+ --yes \
35+ --output-signature "${artifact}.sig" \
36+ --output-certificate "${artifact}.pem" \
37+ "$artifact"
38+ fi
39+ done
You can’t perform that action at this time.
0 commit comments