mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Added GHCR publishing in docker build script
This commit is contained in:
parent
324eda25e0
commit
c918eaf903
1 changed files with 3 additions and 3 deletions
|
@ -8,15 +8,15 @@ DOCKER_IMAGE="shlinkio/shlink-web-client"
|
|||
if [[ "$GITHUB_REF" == *"develop"* ]]; then
|
||||
docker buildx build --push \
|
||||
--platform ${PLATFORMS} \
|
||||
-t ${DOCKER_IMAGE}:latest .
|
||||
-t ${DOCKER_IMAGE}:latest -t ghcr.io/${DOCKER_IMAGE}:latest .
|
||||
|
||||
# If ref is not develop, then this is a tag. Build that docker tag and also "stable"
|
||||
else
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
TAGS="-t ${DOCKER_IMAGE}:${VERSION}"
|
||||
TAGS="-t ${DOCKER_IMAGE}:${VERSION} -t ghcr.io/${DOCKER_IMAGE}:${VERSION}"
|
||||
|
||||
# Push stable tag only if this is not an alpha or beta release
|
||||
[[ $GITHUB_REF != *"alpha"* && $GITHUB_REF != *"beta"* ]] && TAGS="${TAGS} -t ${DOCKER_IMAGE}:stable"
|
||||
[[ $GITHUB_REF != *"alpha"* && $GITHUB_REF != *"beta"* ]] && TAGS="${TAGS} -t ${DOCKER_IMAGE}:stable -t ghcr.io/${DOCKER_IMAGE}:stable"
|
||||
|
||||
docker buildx build --push \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
|
|
Loading…
Reference in a new issue