Install Neoforge from a local file (#3918)

Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
This commit is contained in:
Máté Farkas
2026-02-09 23:19:04 +01:00
committed by GitHub
parent 6e05807865
commit 796849f9d8
2 changed files with 11 additions and 4 deletions

View File

@@ -49,7 +49,8 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.53.4
ARG MC_HELPER_VERSION=1.54.0
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1

View File

@@ -2,6 +2,7 @@
: "${NEOFORGE_VERSION:=latest}"
: "${NEOFORGE_FORCE_REINSTALL:=false}}"
: "${NEOFORGE_INSTALLER:=}"
# shellcheck source=start-utils
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
@@ -9,14 +10,19 @@ isDebugging && set -x
resultsFile=/data/.run-neoforge.env
if ! mc-image-helper install-neoforge \
if [[ ${NEOFORGE_INSTALLER} ]]; then
if ! mc-image-helper install-neoforge --neoforge-installer="${NEOFORGE_INSTALLER}" --output-directory=/data --results-file=${resultsFile} --minecraft-version="${VERSION}" --force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
logError "Failed to installForge given installer ${NEOFORGE_INSTALLER}"
exit 1
fi
elif ! mc-image-helper install-neoforge \
--output-directory=/data \
--results-file=${resultsFile} \
--minecraft-version="${VERSION}" \
--neoforge-version="${NEOFORGE_VERSION}" \
--force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
logError "Failed to install NeoForge"
exit 1
logError "Failed to install NeoForge"
exit 1
fi
applyResultsFile ${resultsFile}