Include and output image.properties (#570)
This commit is contained in:
1 parent
be0a795d98
commit
759b5a6b9f
3 files changed
+17
-1
No files matched your search
@@ -57,5 +57,9 @@ jobs:
|
|||||||
${{ steps.meta.outputs.labels }}
|
${{ steps.meta.outputs.labels }}
|
||||||
manymine.enable=true
|
manymine.enable=true
|
||||||
pull: 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-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
@@ -56,3 +56,12 @@ ENV VERSION=LATEST \
|
|||||||
SERVER_PORT=19132
|
SERVER_PORT=19132
|
||||||
|
|
||||||
HEALTHCHECK --start-period=1m CMD /usr/local/bin/mc-monitor status-bedrock --host 127.0.0.1 --port $SERVER_PORT
|
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
@@ -6,6 +6,7 @@ set -eo pipefail
|
|||||||
: "${PREVIEW:=false}"
|
: "${PREVIEW:=false}"
|
||||||
# Both net and net-secondary hostnames work
|
# Both net and net-secondary hostnames work
|
||||||
: "${DOWNLOAD_LINKS_URL:=https://net-secondary.web.minecraft-services.net/api/v1.0/download/links}"
|
: "${DOWNLOAD_LINKS_URL:=https://net-secondary.web.minecraft-services.net/api/v1.0/download/links}"
|
||||||
|
: "${USE_BOX64:=true}"
|
||||||
|
|
||||||
function isTrue() {
|
function isTrue() {
|
||||||
[[ "${1,,}" =~ ^(true|on|1)$ ]] && return 0
|
[[ "${1,,}" =~ ^(true|on|1)$ ]] && return 0
|
||||||
@@ -96,6 +97,8 @@ function lookupVersion() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "Image info: $(paste -d, -s /etc/image.properties)"
|
||||||
|
|
||||||
if [[ ${DEBUG^^} == TRUE ]]; then
|
if [[ ${DEBUG^^} == TRUE ]]; then
|
||||||
set -x
|
set -x
|
||||||
curlArgs=(-v)
|
curlArgs=(-v)
|
||||||
@@ -309,7 +312,7 @@ if isTrue "${ENABLE_SSH}"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Bedrock server..."
|
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"
|
exec mc-server-runner "${mcServerRunnerArgs[@]}" box64 ./"$SERVER"
|
||||||
else
|
else
|
||||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" ./"$SERVER"
|
exec mc-server-runner "${mcServerRunnerArgs[@]}" ./"$SERVER"
|
||||||
|
|||||||
Reference in new issue
Block a user