aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantinos Smanis <konstantinos.smanis@gmail.com>2020-08-27 22:30:57 +0300
committerAlexys Jacob <ultrabug@gentoo.org>2020-09-04 16:48:27 +0200
commit45cdd16500965528548c2b2e0ecd2044cc20aa31 (patch)
treefe72ace79f1cd74c4132842e034f155caa0e8348 /build.sh
parentAdd CI builds for all supported stage3 architectures (diff)
downloaddocker-images-45cdd16500965528548c2b2e0ecd2044cc20aa31.tar.gz
docker-images-45cdd16500965528548c2b2e0ecd2044cc20aa31.tar.bz2
docker-images-45cdd16500965528548c2b2e0ecd2044cc20aa31.zip
Push all stage3 images to the same Docker repo
Closes: #86 Signed-off-by: Konstantinos Smanis <konstantinos.smanis@gmail.com> Closes: https://github.com/gentoo/gentoo-docker-images/pull/94 Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index c0100d7..5fe7411 100755
--- a/build.sh
+++ b/build.sh
@@ -13,6 +13,11 @@ fi
IFS=- read -r NAME ARCH SUFFIX <<< "${TARGET}"
VERSION=${VERSION:-$(date -u +%Y%m%d)}
+if [[ "${NAME}" == "portage" ]]; then
+ VERSION_SUFFIX=":${VERSION}"
+else
+ VERSION_SUFFIX="-${VERSION}"
+fi
ORG=${ORG:-gentoo}
@@ -62,8 +67,9 @@ docker buildx build \
--build-arg ARCH="${ARCH}" \
--build-arg MICROARCH="${MICROARCH}" \
--build-arg SUFFIX="${SUFFIX}" \
- --tag "${ORG}/${TARGET}:latest" \
- --tag "${ORG}/${TARGET}:${VERSION}" \
+ --tag "${ORG}/${TARGET/-/:}" \
+ --tag "${ORG}/${TARGET/-/:}${VERSION_SUFFIX}" \
+ ${LATEST:+--tag "${ORG}/${NAME}:latest"} \
--platform "linux/${DOCKER_ARCH}" \
--progress plain \
--load \