deploy unstable

This commit is contained in:
simon 2022-06-13 12:18:00 +07:00
parent 2efd97d5d4
commit 2eb38d21ce
Signed by: simon
GPG Key ID: 2C15AA5E89985DD4

View File

@ -70,7 +70,8 @@ function docker_publish {
sudo docker buildx build \ sudo docker buildx build \
--platform linux/amd64,linux/arm64 \ --platform linux/amd64,linux/arm64 \
-t bbilly1/tilefy \ -t bbilly1/tilefy \
-t bbilly1/tilefy:"$VERSION" --push . -t bbilly1/tilefy:"$VERSION" \
-t bbilly1/tilefy:unstable --push .
# create release tag # create release tag
echo "commits since last version:" echo "commits since last version:"
@ -80,6 +81,21 @@ function docker_publish {
} }
# publish unstable tag to docker
function sync_unstable {
if [[ $(systemctl is-active docker) != 'active' ]]; then
echo "starting docker"
sudo systemctl start docker
fi
# start amd64 build
sudo docker buildx build \
--platform linux/amd64 \
-t bbilly1/tilefy:unstable --push .
}
if [[ $1 == "test" ]]; then if [[ $1 == "test" ]]; then
rebuild_test rebuild_test
@ -89,8 +105,10 @@ elif [[ $1 == "validate" ]]; then
validate "$2" validate "$2"
elif [[ $1 == "docker" ]]; then elif [[ $1 == "docker" ]]; then
docker_publish docker_publish
elif [[ $1 == "unstable" ]]; then
sync_unstable
else else
echo "valid options are: test | docker " echo "valid options are: test | docker | unstable"
fi fi
## ##