Обновить execute.py

This commit is contained in:
2025-03-29 22:24:58 +03:00
parent da2b1e9fc0
commit c1df372867

View File

@@ -4,18 +4,13 @@ import os
import sys
print('EXECUTE')
for key, value in os.environ.items():
print(f"{key}={value}")
# for key, value in os.environ.items():
# print(f"{key}={value}")
ACTIONS_RUNTIME_TOKEN = os.getenv('ACTIONS_RUNTIME_TOKEN')
INPUT_TOKEN = os.getenv('INPUT_TOKEN')
GITHUB_SERVER_URL = os.getenv('GITHUB_SERVER_URL')
GITHUB_REPOSITORY = os.getenv('GITHUB_REPOSITORY')
print('GITHUB_SERVER_URL:', GITHUB_SERVER_URL)
print('GITHUB_REPOSITORY:', GITHUB_REPOSITORY)
print(ACTIONS_RUNTIME_TOKEN)
print(len(ACTIONS_RUNTIME_TOKEN))
print('#'*80)
print(sys.argv)
import base64
sample_string = "x-access-token:" + ACTIONS_RUNTIME_TOKEN
@@ -43,17 +38,18 @@ cmd = 'git config list '
cmd = 'git clone ' + \
GITHUB_SERVER_URL + '/' + \
GITHUB_REPOSITORY
GITHUB_REPOSITORY + ' ' + ' '
print('cmd:', cmd)
print('pwd', os.getcwd())
result = os.popen(cmd)
print('result:' , result.read())
cmd = 'git clone ' + \
'https://' + sample_string + '@codex.r10x.net' + '/' + \
GITHUB_REPOSITORY
print('cmd:', cmd)
result = os.popen(cmd)
print('result:' , result.read())
# cmd = 'git clone ' + \
# 'https://' + sample_string + '@codex.r10x.net' + '/' + \
# GITHUB_REPOSITORY
# print('cmd:', cmd)
# result = os.popen(cmd)
# print('result:' , result.read())
print(f"Encoded string: {base64_string}")
print('#'*80)