TAG=$(git rev-parse --short HEAD) NAME="docker.dezendorf.net/subtitles" YAML="../../homelab/k3s/subtitles/subtitles.yaml" docker build --no-cache -t ${NAME}:${TAG} . < Dockerfile docker push ${NAME}:${TAG} docker push ${NAME}:latest echo "Built and pushed:" echo " ${NAME}:${TAG}" echo " ${NAME}:latest" sed -i -e "s#$NAME:.*#$NAME:$TAG#g" ${YAML} git add ${YAML}