2022-03-27 12:17:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
2024-04-17 15:58:42 +00:00
|
|
|
# Copyright (c) 2022-2024 Bryan Joshua Pedini
|
2022-03-27 12:17:59 +00:00
|
|
|
# License: MIT ยท see LICENSE file for more details
|
|
|
|
|
|
|
|
REGEX="^[ ]*(#.*)?$"
|
|
|
|
while read -r VERSION; do
|
|
|
|
if [[ ! "${VERSION}" =~ $REGEX ]]; then
|
2023-12-06 08:41:44 +00:00
|
|
|
docker pull golang:${VERSION}
|
2024-04-18 13:43:37 +00:00
|
|
|
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t ${REGISTRY}/${IMAGE}:${VERSION} .
|
|
|
|
docker push ${REGISTRY}/${IMAGE}:${VERSION}
|
|
|
|
docker image rm ${REGISTRY}/${IMAGE}:${VERSION} golang:${VERSION}
|
2022-03-27 12:17:59 +00:00
|
|
|
fi
|
|
|
|
done < versionlist
|