docker-hugo/build-and-push.sh
2023-08-26 13:59:24 -05:00

10 lines
No EOL
293 B
Bash
Executable file

#!/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}