with latest tag
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-08-21 00:17:57 +02:00
parent 16cf5d8fe4
commit 1dbf1eb537
2 changed files with 38 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
set -e
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
latest_tag="$REGISTRY/$SERVICE:latest"
if [[ -n $DEBUG ]]
then
@@ -16,5 +17,18 @@ fi
echo "docker: logging in"
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
export DOCKER_BUILDKIT=1
function build_target {
target=$1
echo "building $target"
latest_target_tag="$base_tag-$target:latest"
docker push "$latest_target_tag"
}
build_target "deps"
build_target "builder"
echo "docker: pushing image $tag"
DOCKER_BUILDKIT=1 docker push "$tag"
docker push "$tag"
docker push "$latest_tag"