16 lines
491 B
Bash
Executable File
16 lines
491 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# Copyright (c) 2022-2024 Bryan Joshua Pedini
|
|
# License: MIT ยท see LICENSE file for more details
|
|
|
|
REGEX="^[ ]*(#.*)?$"
|
|
while read -r VERSION; do
|
|
if [[ ! "${VERSION}" =~ $REGEX ]]; then
|
|
docker pull golang:${VERSION}
|
|
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}
|
|
fi
|
|
done < versionlist
|