28 lines
580 B
Bash
Executable File
28 lines
580 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
CONTAINER_ENGINE="docker" # podman | docker
|
|
REGISTRY="gitea-http.taildb3494.ts.net/will/thechart"
|
|
|
|
# Source .env file to load environment variables
|
|
if [ -f .env ]; then
|
|
source .env
|
|
fi
|
|
|
|
# Set APP_VERSION from .env VERSION, with fallback
|
|
export APP_VERSION=${VERSION}
|
|
|
|
if [ "$CONTAINER_ENGINE" == "podman" ];
|
|
then
|
|
buildah build \
|
|
-t $REGISTRY:$APP_VERSION \
|
|
--platform linux/amd64 \
|
|
--no-cache .
|
|
else
|
|
DOCKER_BUILDKIT=1 \
|
|
docker buildx build \
|
|
--platform linux/amd64 \
|
|
-t $REGISTRY:$APP_VERSION \
|
|
--no-cache \
|
|
--push .
|
|
fi
|