mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 22:29:07 +00:00
Add less specific versions to docker release
Eg. if version 1.2.3 is released the following tags will be updated/created `1.2.3`, `1.2`, `1`, `latest`.
This commit is contained in:
committed by
GitHub
parent
6193197c71
commit
fadfc396ad
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -41,10 +41,11 @@ jobs:
|
||||
if [ "${{ github.event_name }}" = "schedule" ]; then
|
||||
VERSION=nightly
|
||||
fi
|
||||
|
||||
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
||||
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest"
|
||||
|
||||
if [[ $VERSION =~ ^(([0-9]{1,3})\.[0-9]{1,3})\.[0-9]{1,3}$ ]]; then
|
||||
VERSION_MINOR=${BASH_REMATCH[1]}
|
||||
VERSION_MAJOR=${BASH_REMATCH[2]}
|
||||
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest --tag ${DOCKER_IMAGE}:${VERSION_MINOR} --tag ${DOCKER_IMAGE}:${VERSION_MAJOR}"
|
||||
fi
|
||||
|
||||
echo ::set-output name=docker_username::${DOCKER_USERNAME}
|
||||
|
||||
Reference in New Issue
Block a user