Workflow: added subprocess run to have the correct path for the test log file
This commit is contained in:
6
.github/workflows/upload_data.yml
vendored
6
.github/workflows/upload_data.yml
vendored
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user