30 lines
664 B
Bash
Executable File
30 lines
664 B
Bash
Executable File
#! /bin/bash
|
|
#
|
|
# Build the Docker image for a series of different Forge versions
|
|
#
|
|
|
|
# MC version list
|
|
declare -a mcversions=(
|
|
"1.12.2"
|
|
"1.16.5"
|
|
)
|
|
|
|
# Forge version dictionary (we only support one version per)
|
|
declare -A forgeversions=(
|
|
["1.12.2"]="14.23.5.2855"
|
|
["1.16.5"]="36.1.23"
|
|
)
|
|
|
|
# Build images
|
|
docker buildx create --use
|
|
for mc in ${mcversions[@]}; do
|
|
forge="${forgeversions[$mc]}"
|
|
echo "Building image for Minecraft $mc, Forge $forge, CI_COMMIT_REF_NAME of $CI_COMMIT_REF_NAME"
|
|
docker buildx build \
|
|
--platform linux/amd64 \
|
|
--tag "$CI_HUB_USERNAME/$CI_PROJECT_NAME:$mc-$forge-${CI_COMMIT_REF_NAME:=bleeding}" \
|
|
--push \
|
|
.
|
|
done
|
|
docker images
|