added automatic build and deployment script

This commit is contained in:
Bryan Joshua Pedini 2022-03-27 14:17:59 +02:00
parent 17af235dca
commit e83a1dc2b8
2 changed files with 25 additions and 0 deletions

14
build.sh Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
# Copyright (c) 2022 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
REGEX="^[ ]*(#.*)?$"
while read -r VERSION; do
if [[ ! "${VERSION}" =~ $REGEX ]]; then
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t bryanpedini/gobuilder:${VERSION} .
docker push bryanpedini/gobuilder:${VERSION}
docker image rm bryanpedini/gobuilder:${VERSION} golang:${VERSION}
fi
done < versionlist

11
versionlist Normal file
View File

@ -0,0 +1,11 @@
# Copyright (c) 2022 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
1.17.6-alpine3.14
1.17.6-alpine3.15
1.17.7-alpine3.14
1.17.7-alpine3.15
1.17.8-alpine3.14
1.17.8-alpine3.15
1.18.0-alpine3.14
1.18.0-alpine3.15