Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use manifest digest for signing #217

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,13 @@ function run_build() {
fi
done
done
fi

# Singing image (cosign)
cosign_sign "${repository}/${image}:${version}"
# Singing image (cosign)
if bashio::var.true "${COSIGN}"; then
image_digest=$(docker inspect --format='{{index .RepoDigests 0}}' "${repository}/${image}:${version}")
cosign_sign "${image_digest}"
fi
fi
}

function convert_to_json() {
Expand Down Expand Up @@ -756,10 +759,6 @@ function cosign_sign() {

local success=false

if bashio::var.false "${DOCKER_PUSH}" || bashio::var.false "${COSIGN}"; then
return 0
fi

for j in {1..6}; do
if cosign sign --yes "${image}"; then
success=true
Expand Down