ci: tag docker with major version

This commit is contained in:
Peter Evans 2020-09-25 11:32:57 +09:00
parent 6cde3510ab
commit 03c1121463

View file

@ -34,5 +34,8 @@ jobs:
# Tag with the minor version if valid
MINOR_VERSION=$(echo $VERSION | sed -n "s/^\([0-9]*.[0-9]*\).[0-9]*$/\1/p")
[[ ${#MINOR_VERSION} -gt 0 ]] && docker tag $IMAGE_NAME $IMAGE_NAME:$MINOR_VERSION
# Tag with the major version if valid
MAJOR_VERSION=$(echo $VERSION | sed -n "s/^\([0-9]*\).[0-9]*.[0-9]*$/\1/p")
[[ ${#MAJOR_VERSION} -gt 0 ]] && docker tag $IMAGE_NAME $IMAGE_NAME:$MAJOR_VERSION
docker push $IMAGE_NAME