CI: Update Docker image build scripts to support additional args
This commit is contained in:
parent
db9cbe72c6
commit
a19b782162
3 changed files with 15 additions and 3 deletions
|
@ -18,7 +18,11 @@ echo "Building image 'photoprism/$1' from docker/${1/-//}$3/Dockerfile...";
|
|||
if [[ $1 ]] && [[ -z $2 || $2 == "preview" ]]; then
|
||||
echo "Build Tags: preview"
|
||||
|
||||
docker build \
|
||||
if [[ $4 ]]; then
|
||||
echo "Build Params: $4"
|
||||
fi
|
||||
|
||||
docker build $4\
|
||||
--no-cache \
|
||||
--build-arg BUILD_TAG=$BUILD_DATE \
|
||||
-t photoprism/$1:preview \
|
||||
|
|
|
@ -27,13 +27,17 @@ echo "Build Arch: $2"
|
|||
if [[ $1 ]] && [[ $2 ]] && [[ -z $3 || $3 == "preview" ]]; then
|
||||
echo "Build Tags: preview"
|
||||
|
||||
if [[ $5 ]]; then
|
||||
echo "Build Params: $5"
|
||||
fi
|
||||
|
||||
docker buildx build \
|
||||
--platform $2 \
|
||||
--pull \
|
||||
--no-cache \
|
||||
--build-arg BUILD_TAG=$BUILD_DATE \
|
||||
-f docker/${1/-//}$4/Dockerfile \
|
||||
-t photoprism/$1:preview \
|
||||
-t photoprism/$1:preview $5 \
|
||||
--push .
|
||||
elif [[ $3 =~ $NUMERIC ]]; then
|
||||
echo "Build Tags: $3, latest"
|
||||
|
|
|
@ -17,13 +17,17 @@ echo "Build Arch: $2"
|
|||
if [[ $1 ]] && [[ $2 ]] && [[ -z $3 || $3 == "preview" ]]; then
|
||||
echo "Build Tags: preview"
|
||||
|
||||
if [[ $5 ]]; then
|
||||
echo "Build Params: $5"
|
||||
fi
|
||||
|
||||
docker buildx build \
|
||||
--platform $2 \
|
||||
--pull \
|
||||
--no-cache \
|
||||
--build-arg BUILD_TAG=$BUILD_DATE \
|
||||
-f docker/${1/-//}$4/Dockerfile \
|
||||
-t photoprism/$1:preview \
|
||||
-t photoprism/$1:preview $5 \
|
||||
--push .
|
||||
elif [[ $3 =~ $NUMERIC ]]; then
|
||||
echo "Build Tags: $3, latest"
|
||||
|
|
Loading…
Reference in a new issue