Skip to content

Commit

Permalink
Use manifest digest for signing
Browse files Browse the repository at this point in the history
Instead of using the image name and tag, use the image name and the
manifest sha256. This allows to verify the image sha256 in logs etc.
and gets rid of the following warning from cosign:

```
WARNING: Image reference ghcr.io/home-assistant/amd64-builder:dev uses a tag, not a digest, to identify the image to sign.
```
  • Loading branch information
agners committed Aug 12, 2024
1 parent 1eac7a4 commit a161d0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ function run_build() {
fi

# Singing image (cosign)
cosign_sign "${repository}/${image}:${version}"
image_id=$(docker inspect --format='{{index .RepoDigests 0}}' "${repository}/${image}:${version}")
cosign_sign "${image_id}"
}

function convert_to_json() {
Expand Down

0 comments on commit a161d0f

Please sign in to comment.