Skip to content

Commit b12e4bb

Browse files
committed
sign image
Signed-off-by: cpanato <[email protected]>
1 parent e50e23c commit b12e4bb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030

3131
- uses: sigstore/cosign-installer@c3667d99424e7e6047999fb6246c0da843953c65 # v3.0.1
3232
- uses: anchore/sbom-action/download-syft@07978da4bdb4faa726e52dfc6b1bed63d4b56479 # v0.13.3
33+
- uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c # v0.3
3334

3435
- name: Log into ghcr.io
3536
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
@@ -64,6 +65,11 @@ jobs:
6465
checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path')
6566
echo "hashes=$(cat $checksum_file | base64 -w0)" >> "$GITHUB_OUTPUT"
6667
68+
- name: sign image
69+
run: |
70+
DIGEST=$(crane digest ghcr.io/cpanato/github_actions_exporter:${{ steps.get_tag.outputs.TAG }})
71+
cosign sign "ghcr.io/cpanato/github_actions_exporter@${DIGEST}"
72+
6773
provenance:
6874
needs:
6975
- release

.goreleaser.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ kos:
5555
- id: ko-image
5656
main: .
5757
base_image: cgr.dev/chainguard/static
58-
repository: ghcr.io/cpanato/github_actions_exporter
58+
repository: ghcr.io/cpanato
5959
platforms:
6060
- all
6161
tags:
@@ -66,10 +66,6 @@ kos:
6666
preserve_import_paths: false
6767
base_import_paths: true
6868

69-
docker_signs:
70-
- artifacts: all
71-
args: ["sign", "${artifact}"]
72-
7369
release:
7470
github:
7571
owner: cpanato

0 commit comments

Comments
 (0)