Build script fixes
All checks were successful
Create and publish container / build_container (push) Successful in 9s
All checks were successful
Create and publish container / build_container (push) Successful in 9s
This commit is contained in:
@@ -3,11 +3,15 @@
|
|||||||
echo "Build will be tagged with $1"
|
echo "Build will be tagged with $1"
|
||||||
echo "Build directory is $(pwd)"
|
echo "Build directory is $(pwd)"
|
||||||
|
|
||||||
OLD_IMG=docker image ls -q "$1"
|
OLD_IMG=$(docker image ls -q "$1")
|
||||||
docker buildx build . -t "$1"
|
docker buildx build . -t "$1"
|
||||||
|
|
||||||
echo "Build complete, starting upload..."
|
echo "Build complete, starting upload..."
|
||||||
docker push "$1"
|
docker push "$1"
|
||||||
|
|
||||||
echo "New build uploaded, removing old image, id: $OLD_IMG"
|
if [[ -n "$OLD_IMG" ]]; then
|
||||||
docker image rm "$OLD_IMG"
|
if [[ "$OLD_IMG" != "$(docker image ls -q "$1")" ]]; then
|
||||||
|
echo "New build uploaded, removing old image, id: $OLD_IMG"
|
||||||
|
docker image rm "$OLD_IMG"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user