mirror of
https://github.com/peter-evans/dockerhub-description.git
synced 2024-11-22 03:59:34 +01:00
ci: tag docker with major version
This commit is contained in:
parent
6cde3510ab
commit
03c1121463
1 changed files with 3 additions and 0 deletions
3
.github/workflows/publish-docker.yml
vendored
3
.github/workflows/publish-docker.yml
vendored
|
@ -34,5 +34,8 @@ jobs:
|
||||||
# Tag with the minor version if valid
|
# Tag with the minor version if valid
|
||||||
MINOR_VERSION=$(echo $VERSION | sed -n "s/^\([0-9]*.[0-9]*\).[0-9]*$/\1/p")
|
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
|
[[ ${#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
|
docker push $IMAGE_NAME
|
||||||
|
|
Loading…
Reference in a new issue