addet workflows!
Some checks failed
Build and Push to Forgejo Registry / build (push) Has been cancelled

This commit is contained in:
pika 2025-04-06 20:41:55 +02:00
parent 0683f18868
commit 9d952d0a70
2 changed files with 24 additions and 53 deletions

View file

@ -35,37 +35,15 @@ tag=latest
container="${domain}/${image}:${tag}"
askToPush() {
echo_info "Do you want to push directly to $domain?"
read -r push_
case "$push_" in
[yY])
push=true
;;
[nN])
push=false
;;
*)
echo_warning "You entered something wrong!"
askToPush
;;
esac
if $push; then
docker push "$container"
fi
}
if ! command_exists docker; then
echo_error "Docker does not exist!"
exit 1
fi
[[ ! -e ./Dockerfile ]] &&
echo_error "Dockerfile does not exist" &&
exit 1
# if ! command_exists docker; then
# echo_error "Docker does not exist!"
# exit 1
# fi
#
# [[ ! -e ./Dockerfile ]] &&
# echo_error "Dockerfile does not exist" &&
# exit 1
#
docker build -t "$container" .
askToPush
docker push "$container"