runner-images/build.sh
Tanguy Herbron 590a9a5d78
All checks were successful
Image builder / build (push) Successful in 22s
feat(CI): Add pipeline to build images
2023-08-07 11:25:07 +02:00

17 lines
421 B
Bash
Executable File

#!/bin/sh
IMAGE_NAME=$(echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-)
for d in ./images/*
do
for i in $d/*
do
echo "Building $i"
DISTRO=$(echo $i | cut -d '/' -f 3)
VERSION=$(echo $i | cut -d '/' -f 4 | cut -d '.' -f2-)
docker build -f $i . -t $IMAGE_NAME:$DISTRO$VERSION
docker push $IMAGE_NAME:$DISTRO$VERSION
done
done