From ece2c9c8d61f3d17a33655365240cc4a2d22baa5 Mon Sep 17 00:00:00 2001 From: askiiart Date: Sat, 26 Aug 2023 13:59:24 -0500 Subject: [PATCH] Add built and push script --- build-and-push.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 build-and-push.sh diff --git a/build-and-push.sh b/build-and-push.sh new file mode 100755 index 0000000..c4f9ad4 --- /dev/null +++ b/build-and-push.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh +ORG=askiiart +NAME=hugo +VERSION=$(find . -name "hugo_*_linux-amd64" | sed 's/.*_\(.*\)_.*/\1/') +ID=$(docker build . -q) + +docker tag ${ID} ${ORG}/${NAME}:latest +docker tag ${ID} ${ORG}/${NAME}:v${VERSION} +docker push ${ORG}/${NAME}:latest +docker push ${ORG}/${NAME}:v${VERSION} \ No newline at end of file