Skip to content
Open
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
11 changes: 11 additions & 0 deletions src/std/fwlib/blockTypes/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ in
(mkCommand currentSystem "publish" "copy the image to its remote registry" [skopeo-nix2container] ''
${copyFn}
copy docker://${target.image.repo}

# Get the digest of the published image
DIGEST=$(skopeo inspect --raw docker://${target.image.repo}:${builtins.head target.image.tags} | jq -r '.config.digest')

echo "$DIGEST"
echo "$GITHUB_OUTPUT"

# Conditionally output the name and digest for GitHub Actions
if [ -n "$GITHUB_OUTPUT" ]; then
echo 'out={"name": "${target.image.repo}", "digest": "'"$DIGEST"'"}' >> "$GITHUB_OUTPUT"
fi
'' {
meta.image = target.image.name;
inherit proviso;
Expand Down
Loading