From 1bf4d875afd2e0b8d2565da2efa1a3fa359a5580 Mon Sep 17 00:00:00 2001 From: htom Date: Sun, 9 Nov 2025 14:48:04 +0100 Subject: [PATCH] Workflow: added subprocess run to have the correct path for the test log file --- .github/workflows/upload_data.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload_data.yml b/.github/workflows/upload_data.yml index 6d9069c..3d6118b 100644 --- a/.github/workflows/upload_data.yml +++ b/.github/workflows/upload_data.yml @@ -23,14 +23,16 @@ jobs: echo "$GOOGLE_SERVICE_ACCOUNT_JSON" > service_account.json python <<'PYCODE' - import gspread, json, time + import gspread, json, time, subprocess # credentials creds = json.load(open("service_account.json")) gc = gspread.service_account_from_dict(creds) sh = gc.open_by_key("${{ secrets.SPREADSHEET_ID }}") + v = subprocess.run(['git rev-parse --show-toplevel'], capture_output=True).stdout.decode() + print(v) - with open("test_data.log", "r") as f: + with open(f"{v}/test_data.log", "r") as f: lines = [line.strip() for line in f if line.strip()] project = lines[0].lower()