Build images using buildx plugin and automatically push on main branch

This commit is contained in:
Andrejs Cunskis 2022-05-10 17:17:46 +03:00
parent 5a79c03924
commit fe331541d7
No known key found for this signature in database
GPG key ID: 87CB75083F227241
15 changed files with 213 additions and 357 deletions

View file

@ -1,19 +0,0 @@
#!/bin/bash
set -e
IFS=$'\n\t'
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "$SCRIPT_DIR/lib/custom-docker.sh"
function custom_push() {
build_image_path=$(get_image_path)
build_image_tag=$(get_image_tag)
echo "Pushing image $build_image_path:$build_image_tag"
full_image_name="$build_image_path:$build_image_tag"
docker push "$full_image_name"
printf "\n\nSUCCESS - Successfully pushed:\n\t%s" "$build_image_name"
}
custom_push