When publishing images, the :latest tag will not be applied if the current tag includes -beta
This commit is contained in:
1 parent
664e361ab4
commit
bcab10a478
1 file changed
+8
-1
@@ -39,7 +39,14 @@ build_image() {
|
||||
IMAGENAME=$2
|
||||
IMAGETAG=${IMAGENAME}:${IMAGE_VERSION}
|
||||
if [ "$PUBLISH" = "true" ]; then
|
||||
PUBLISHTAGOPT="-t ${IMAGENAME}:latest"
|
||||
# When an image is published to a registry, also tag it
|
||||
# with ':latest', unless the image version string
|
||||
# contains '-beta'
|
||||
case "$IMAGE_VERSION" in
|
||||
*-beta*) IS_BETA=1 ;;
|
||||
*) IS_BETA= ;;
|
||||
esac
|
||||
[ -z "${IS_BETA}" ] && PUBLISHTAGOPT="-t ${IMAGENAME}:latest"
|
||||
else
|
||||
PUBLISHTAGOPT=""
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user