docker-hugo/build-and-push.sh

10 lines
293 B
Bash
Raw Normal View History

2023-08-26 13:59:24 -05:00
#!/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}