Include and output image.properties (#570)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2025-11-03 17:28:29 -06:00
1 parent be0a795d98
commit 759b5a6b9f
3 files changed
+17 -1

No files matched your search

+4
View File
@@ -57,5 +57,9 @@ jobs:
${{ steps.meta.outputs.labels }}
manymine.enable=true
pull: true
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
cache-from: type=gha
cache-to: type=gha,mode=max
+9
View File
@@ -56,3 +56,12 @@ ENV VERSION=LATEST \
SERVER_PORT=19132
HEALTHCHECK --start-period=1m CMD /usr/local/bin/mc-monitor status-bedrock --host 127.0.0.1 --port $SERVER_PORT
ARG BUILDTIME=local
ARG VERSION=local
ARG REVISION=local
COPY <<EOF /etc/image.properties
buildtime=${BUILDTIME}
version=${VERSION}
revision=${REVISION}
EOF
+4 -1
View File
@@ -6,6 +6,7 @@ set -eo pipefail
: "${PREVIEW:=false}"
# Both net and net-secondary hostnames work
: "${DOWNLOAD_LINKS_URL:=https://net-secondary.web.minecraft-services.net/api/v1.0/download/links}"
: "${USE_BOX64:=true}"
function isTrue() {
[[ "${1,,}" =~ ^(true|on|1)$ ]] && return 0
@@ -96,6 +97,8 @@ function lookupVersion() {
fi
}
echo "Image info: $(paste -d, -s /etc/image.properties)"
if [[ ${DEBUG^^} == TRUE ]]; then
set -x
curlArgs=(-v)
@@ -309,7 +312,7 @@ if isTrue "${ENABLE_SSH}"; then
fi
echo "Starting Bedrock server..."
if [[ -f /usr/local/bin/box64 ]] ; then
if [[ -f /usr/local/bin/box64 ]] && isTrue "${USE_BOX64}" ; then
exec mc-server-runner "${mcServerRunnerArgs[@]}" box64 ./"$SERVER"
else
exec mc-server-runner "${mcServerRunnerArgs[@]}" ./"$SERVER"