Обновить executor/cli/git.py
All checks were successful
Test Actions / Builder (push) Successful in 7s

This commit is contained in:
2025-10-19 03:26:07 +03:00
parent df7b91e6b1
commit 122f24e674

View File

@@ -14,6 +14,7 @@ def handle_git(args):
DEBUG = True
ACTIONS_RUNTIME_TOKEN = os.getenv('ACTIONS_RUNTIME_TOKEN')
INPUT_TOKEN = os.getenv('INPUT_TOKEN')
INPUT_REF = os.getenv('INPUT_REF')
INPUT_REPOSITORY = os.getenv('INPUT_REPOSITORY')
INPUT_PATH = os.getenv('INPUT_PATH')
GITHUB_SERVER_URL = os.getenv('GITHUB_SERVER_URL')
@@ -22,6 +23,8 @@ def handle_git(args):
GITHUB_REF_NAME = os.getenv('GITHUB_REF_NAME')
# assert ACTIONS_RUNTIME_TOKEN==INPUT_TOKEN, 'token not equal'
TOKEN = INPUT_TOKEN
REPOSITORY = INPUT_REPOSITORY
REF = INPUT_REF
def escape(text):
return '"' + text + '"'
@@ -51,7 +54,7 @@ def handle_git(args):
cmd = 'git config set --local ' + escape(key) + ' ' + escape(GITHUB_SERVER_URL)
exec_cmd(cmd)
cmd = 'git remote add origin ' + GITHUB_SERVER_URL + INPUT_REPOSITORY
cmd = 'git remote add origin ' + GITHUB_SERVER_URL + REPOSITORY
exec_cmd(cmd)
cmd = 'git fetch --progress --depth 1 origin ' + GITHUB_REF