ci: publish major version tags

This commit is contained in:
Gauthier Roebroeck 2022-01-31 11:22:25 +08:00
parent 8da2489671
commit c380e97531
3 changed files with 8 additions and 0 deletions

View file

@ -11,4 +11,8 @@ else
DOCKER_CHANNEL=$2
fi
VERSION_ARRAY=( ${1//./ } )
VERSION_MAJOR="${VERSION_ARRAY[0]}"
echo "DockerHub channel: $DOCKER_CHANNEL"
echo "Major version: $VERSION_MAJOR"

View file

@ -14,6 +14,7 @@ docker buildx build \
--platform $PLATFORMS \
--cache-from gotson/komga:$DOCKER_CHANNEL \
--tag gotson/komga:$DOCKER_CHANNEL \
--tag gotson/komga:$VERSION_MAJOR.x \
--tag gotson/komga:$1 \
--file ./Dockerfile .
@ -22,5 +23,6 @@ docker buildx build \
--platform $PLATFORMS \
--cache-from gotson/komga:$DOCKER_CHANNEL-legacy \
--tag gotson/komga:$DOCKER_CHANNEL-legacy \
--tag gotson/komga:$VERSION_MAJOR.x-legacy \
--tag gotson/komga:$1-legacy \
--file ./Dockerfile.legacy .

View file

@ -11,6 +11,7 @@ docker buildx build \
--platform $PLATFORMS \
--cache-from gotson/komga:$DOCKER_CHANNEL \
--tag gotson/komga:$DOCKER_CHANNEL \
--tag gotson/komga:$VERSION_MAJOR.x \
--tag gotson/komga:$1 \
--file ./Dockerfile . \
--push
@ -20,6 +21,7 @@ docker buildx build \
--platform $PLATFORMS \
--cache-from gotson/komga:$DOCKER_CHANNEL-legacy \
--tag gotson/komga:$DOCKER_CHANNEL-legacy \
--tag gotson/komga:$VERSION_MAJOR.x-legacy \
--tag gotson/komga:$1-legacy \
--file ./Dockerfile.legacy . \
--push