Use GitHub actions to build Docker image

This commit is contained in:
xZero707
2021-03-18 20:44:13 +01:00
parent d6d9fc4007
commit 431b0572c0
2 changed files with 30 additions and 0 deletions

11
bin/build Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env sh
LATEST_TAG="$(git describe --tags --abbrev=0)"
WP_VERSION="${1:-$LATEST_TAG}"
if [ -z "${WP_VERSION}" ]; then
echo "Error: WP_VERSION is null"
exit 1
fi
docker build --build-arg WP_VERSION=${WP_VERSION} --push --tag "nlss/wordpress:${WP_VERSION}" --tag "nlss/base-alpine:latest" .