Compare commits

...

2 Commits

Author SHA1 Message Date
e83a1dc2b8 added automatic build and deployment script 2022-03-27 14:18:10 +02:00
17af235dca added Dockerfile 2022-03-27 14:17:47 +02:00
3 changed files with 33 additions and 0 deletions

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
# Copyright (c) 2022 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
ARG GO_VERSION "$GO_VERSION"
FROM golang:${GO_VERSION}
RUN apk add --no-cache git; \
rm -rf /var/cache/apk

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