Add Docker tag latest

This commit is contained in:
xZero707
2021-09-22 23:58:48 +02:00
parent 827f27fb7f
commit 4048bf938a
2 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env sh
WP_VERSIONS=${1:-""}
WP_LATEST_VERSION=${2:-""}
if [ -z "${WP_VERSIONS}" ]; then
echo "Error: WP_VERSIONS is null"
@@ -10,9 +11,12 @@ fi
docker buildx create --use --name build --node build --driver-opt network=host
# Loop through requested versions
for TARGET_VERSION in ${WP_VERSIONS}
do
for TARGET_VERSION in ${WP_VERSIONS}; do
echo "> Building WordPress ${TARGET_VERSION}"
docker buildx build --pull --push --build-arg "WP_VERSION=${TARGET_VERSION}" --platform "linux/amd64,linux/armhf,linux/aarch64" --tag "nlss/wordpress:${TARGET_VERSION}" .
done
if [ "${TARGET_VERSION}" == "${WP_LATEST_VERSION}"]; then
docker buildx build --pull --push --build-arg "WP_VERSION=${TARGET_VERSION}" --platform "linux/amd64,linux/armhf,linux/aarch64" --tag "nlss/wordpress:latest" .
fi
done