diff --git a/configure.py b/configure.py index 0adc521..7aefde2 100644 --- a/configure.py +++ b/configure.py @@ -1,7 +1,8 @@ import sys import os import json -import tempfile + +CONSTRUCTED_CONFIG_FILE = "/tmp/runner-config.json" def main() -> str: @@ -20,12 +21,10 @@ def main() -> str: print(f"Missing required configuration value {err}", file=sys.stderr) sys.exit(1) - path = tempfile.mkstemp(prefix="semaphore-runner-") - - with open(path, "w") as outfile: + with open(CONSTRUCTED_CONFIG_FILE, "w") as outfile: json.dump(config, outfile, indent=4) - return path + sys.exit(0) if __name__ == "__main__": diff --git a/entrypoint.sh b/entrypoint.sh index a994ad2..97449e2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,4 +2,6 @@ set -e -semaphore runner --config="$(python /configure.py)" +python /configure.py + +semaphore runner --config=/tmp/runner-config.json