From e5fc94a0e169aea21a9ed3473515065e51dff058 Mon Sep 17 00:00:00 2001 From: Tom - Henry Coursow Date: Thu, 27 Jul 2023 23:24:27 +0200 Subject: [PATCH] deployment.py aktualisiert --- deployment.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deployment.py b/deployment.py index 84cfdc5..f1dbbe6 100644 --- a/deployment.py +++ b/deployment.py @@ -16,7 +16,10 @@ def run(): current_number = current_number + last_number last_number = temp - with open(os.environ['GITHUB_OUTPUT'], 'a+') as gh_output: + output_file_path = os.environ['GITHUB_OUTPUT'] + os.makedirs(os.path.dirname(output_file_path), exist_ok=True) # Create directory if it does not exist + + with open(output_file_path, 'a') as gh_output: # 'a' mode will create the file if it does not exist, otherwise it will append print(f'lastNumber={last_number}', file=gh_output)