From 57641f7536db4aa5d4b1a152da6ffaa9b99d909d Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Sat, 15 Jan 2022 23:57:32 +1300 Subject: [PATCH] Print the build version when the container starts --- .github/workflows/build_ci.yml | 2 ++ overlay/entrypoint.sh | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index c3a6610..646da57 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -59,6 +59,8 @@ jobs: fi fi + echo ${VERSION} > ./overlay/version.txt + DOCKER_PUSH="true" if [[ ${DOCKER_IMAGE} != 'docker.io/josh5/steam-headless' ]]; then DOCKER_PUSH="false" diff --git a/overlay/entrypoint.sh b/overlay/entrypoint.sh index bc17878..36b0922 100644 --- a/overlay/entrypoint.sh +++ b/overlay/entrypoint.sh @@ -5,7 +5,7 @@ # File Created: Saturday, 8th January 2022 7:08:46 pm # Author: Josh.5 (jsunnex@gmail.com) # ----- -# Last Modified: Tuesday, 11th January 2022 8:44:17 pm +# Last Modified: Saturday, 15th January 2022 11:55:48 pm # Modified By: Josh.5 (jsunnex@gmail.com) ### @@ -17,6 +17,11 @@ if [ ! -z "$@" ]; then exit $? fi +# Print the current version (if the file exists) +if [[ -f /version.txt ]]; then + echo "Version: $(cat /version.txt)" +fi + # Execute all container init scripts for init_script in /etc/cont-init.d/*.sh ; do echo