Add built and push script

This commit is contained in:
askiiart 2023-08-26 13:59:24 -05:00
parent 04ecaa280c
commit ece2c9c8d6
No known key found for this signature in database
GPG key ID: 85505F3A2264FA01

10
build-and-push.sh Executable file
View file

@ -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}