chore: update build_image.sh: also push latest images

This commit is contained in:
Paul Pan 2023-12-22 15:26:39 +08:00
parent dc50562f22
commit 36e5449517
Signed by: Paul
GPG Key ID: D639BDF5BA578AF4

View File

@ -24,7 +24,7 @@ function push_base() {
function build_server() {
log_info "[+] Building Server"
$DOCKER build -t "git.0x7f.app/woj/woj-server:$VERSION" -f Server.Dockerfile . ||
$DOCKER build -t "git.0x7f.app/woj/woj-server:latest" -f Server.Dockerfile . ||
(log_error "[!] Failed to build Server" && exit 1)
}
@ -34,18 +34,22 @@ function build_runner() {
--cap-add=sys_admin,mknod \
--device=/dev/fuse \
--security-opt label=disable \
-t "git.0x7f.app/woj/woj-runner:$VERSION" \
-t "git.0x7f.app/woj/woj-runner:latest" \
-f Runner.Dockerfile . ||
(log_error "[!] Failed to build Runner" && exit 1)
}
function push_server() {
log_info "[+] Pushing Server Images"
$DOCKER push "git.0x7f.app/woj/woj-server:latest"
$DOCKER tag "git.0x7f.app/woj/woj-server:latest" "git.0x7f.app/woj/woj-server:$VERSION"
$DOCKER push "git.0x7f.app/woj/woj-server:$VERSION"
}
function push_runner() {
log_info "[+] Pushing Runner Images"
$DOCKER push "git.0x7f.app/woj/woj-runner:latest"
$DOCKER tag "git.0x7f.app/woj/woj-runner:latest" "git.0x7f.app/woj/woj-runner:$VERSION"
$DOCKER push "git.0x7f.app/woj/woj-runner:$VERSION"
}