cuddle-rust-service-plan/scripts/push_release.sh
2022-08-20 23:54:50 +02:00

22 lines
380 B
Bash
Executable File

#!/bin/bash
set -e
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
if [[ -n $DEBUG ]]
then
echo "debug:"
echo " REGISTRY: $REGISTRY"
echo " SERVICE: $SERVICE"
echo " COMMIT_SHA: $COMMIT_SHA"
echo " TMP: $TMP"
fi
echo "docker: logging in"
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
echo "docker: pushing image $tag"
DOCKER_BUILDKIT=1 docker push "$tag"