diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5970c85..3d30337 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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