2022-08-20 23:54:50 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-08-21 16:42:38 +02:00
|
|
|
base_tag="$REGISTRY/$SERVICE"
|
|
|
|
tag="$base_tag:${COMMIT_SHA:0:10}"
|
|
|
|
latest_tag="$base_tag:latest"
|
2022-08-20 23:54:50 +02:00
|
|
|
|
2022-08-21 16:42:38 +02:00
|
|
|
export DOCKER_BUILDKIT=1
|
2022-08-20 23:54:50 +02:00
|
|
|
|
|
|
|
echo "docker: logging in"
|
|
|
|
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
|
|
|
|
|
|
|
echo "docker: pushing image $tag"
|
2022-08-21 16:50:31 +02:00
|
|
|
docker push "$base_tag" --all-tags
|
2022-08-20 23:54:50 +02:00
|
|
|
|