Added echos to build job
All checks were successful
Build a new image for the MycroForge docs / build (push) Successful in 1m11s

This commit is contained in:
mdnapo 2024-10-13 18:40:59 +02:00
parent 3de2322524
commit 768136696f

View File

@ -22,10 +22,15 @@ jobs:
# EXISTS = 0 if the image was found else 1.
EXISTS=$(docker manifest inspect $VERSIONED_TAG > /dev/null 2>&1; echo $?)
# Build a new image and push it if the versioned tag was not found.
# If the image does not exist, then build it.
if [[ $EXISTS -eq 1 ]]; then
echo "Building image $VERSIONED_TAG"
docker build -t $VERSIONED_IMAGE_TAG -t $LATEST_IMAGE_TAG .
echo "Building image $VERSIONED_TAG"
docker push $VERSIONED_IMAGE_TAG
echo "Building image $LATEST_IMAGE_TAG"
docker push $LATEST_IMAGE_TAG
# Else notify the user that the image tag already exists and exit with status code 1.
else