Log digest of docker image
This commit is contained in:
parent
e821dd4e94
commit
c440cc1c8d
1 changed files with 16 additions and 1 deletions
|
|
@ -134,7 +134,22 @@ docker_login()
|
||||||
push_docker_image()
|
push_docker_image()
|
||||||
{
|
{
|
||||||
local image_name=$1
|
local image_name=$1
|
||||||
|
|
||||||
|
# Log the image name before pushing
|
||||||
|
echo "Pushing image: $image_name"
|
||||||
|
|
||||||
|
# Push the image
|
||||||
"$scripts"/custom-timeout.sh 30 docker push "$image_name"
|
"$scripts"/custom-timeout.sh 30 docker push "$image_name"
|
||||||
|
|
||||||
|
# After pushing, get the digest from the local image manifest
|
||||||
|
local digest
|
||||||
|
digest=$(docker image inspect --format='{{index .RepoDigests 0}}' "$image_name")
|
||||||
|
|
||||||
|
if [ -n "$digest" ]; then
|
||||||
|
echo "::notice::Hash: $digest $image_name"
|
||||||
|
else
|
||||||
|
echo "::error::Could not retrieve digest for image $image_name"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
deploy_env_images()
|
deploy_env_images()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue