Skip to content

Commit ebacaaa

Browse files
committed
linx signing only
1 parent 74fa7d9 commit ebacaaa

File tree

2 files changed

+244
-250
lines changed

2 files changed

+244
-250
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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

0 commit comments

Comments
 (0)