diff --git a/Dockerfile b/Dockerfile index df20609..82bb263 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,6 +70,9 @@ LABEL org.opencontainers.image.title="free-games-claimer" \ org.opencontainers.image.base.name="ubuntu:jammy" \ org.opencontainers.image.version="latest" +ENV COMMIT_SHA=${COMMIT_SHA} +ENV BRANCH=${BRANCH} + # Configure VNC via environment variables: ENV VNC_PORT 5900 ENV NOVNC_PORT 6080 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 7796364..cfdac7e 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,6 +2,9 @@ set -eo pipefail # exit on error, error on any fail in pipe (not just last cmd); add -x to print each cmd; see gist bash_strict_mode.md +echo "Version: https://github.com/vogler/free-games-claimer/tree/${COMMIT_SHA}" +[ ! -z $BRANCH ] && [ $BRANCH != "main" ] && echo "Branch: ${BRANCH}" + # Remove chromium profile lock. # When running in docker and then killing it, on the next run chromium displayed a dialog to unlock the profile which made the script time out. # Maybe due to changed hostname of container or due to how the docker container kills playwright - didn't check.