diff --git a/action.yml b/action.yml index 0339dd4..76226bb 100644 --- a/action.yml +++ b/action.yml @@ -37,6 +37,9 @@ inputs: custom_api_endpoint: description: 'Custom API endpoint of LanguageTool server. e.g. https://languagetool.org/api' default: '' + wait_server_startup_duration: + description: 'Wait the startup of the server.' + default: '3' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index 3e2fd6d..e7c9442 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,7 +5,8 @@ API_ENDPOINT="${INPUT_CUSTOM_API_ENDPOINT}" if [ -z "${INPUT_CUSTOM_API_ENDPOINT}" ]; then API_ENDPOINT=http://localhost:8010 java -cp "/LanguageTool/languagetool-server.jar" org.languagetool.server.HTTPServer --port 8010 & - sleep 3 # Wait the server statup. + echo "Wait the server startup for ${INPUT_WAIT_SERVER_STARTUP_DURATION}s" + sleep "${INPUT_WAIT_SERVER_STARTUP_DURATION}" # Wait the server startup. fi echo "API ENDPOINT: ${API_ENDPOINT}" >&2