Update
All checks were successful
Test Actions / Builder (push) Successful in 9s

This commit is contained in:
2025-03-30 20:22:02 +03:00
parent fb65226642
commit 7845f03270

View File

@@ -15,6 +15,9 @@ GITHUB_REF = os.getenv('GITHUB_REF')
def escape(text):
return '"' + text + '"'
cmd = 'git init'
os.popen(cmd)
sample_string = "x-access-token:" + ACTIONS_RUNTIME_TOKEN
sample_string = "x-access-token:" + INPUT_TOKEN
sample_string_bytes = sample_string.encode("utf-8")
@@ -24,22 +27,19 @@ base64_string = 'AUTHORIZATION: basic ' + base64_bytes.decode("utf-8")
key = 'http.'+GITHUB_SERVER_URL+'/.extraheader'
value = base64_string
cmd = 'git config set --global ' + key + ' ' + escape(value)
cmd = 'git config set --local ' + key + ' ' + escape(value)
result = os.popen(cmd)
key = 'url.'+GITHUB_SERVER_URL+'/.insteadOf'
cmd = 'git config set --global ' + escape(key) + ' ' + GITHUB_SERVER_URL
cmd = 'git config set --local ' + escape(key) + ' ' + GITHUB_SERVER_URL
key = 'url.'+GITHUB_SERVER_URL+'/.insteadOf'
key = 'url.https://'+INPUT_TOKEN+':x-oauth-basic@codex.r10x.net'+'/.insteadOf'
key = 'url.https://'+ACTIONS_RUNTIME_TOKEN+':x-oauth-basic@codex.r10x.net'+'/.insteadOf'
value = 'git@"'+base64_string+'"'
cmd = 'git config set --global ' + escape(key) + ' ' + escape(GITHUB_SERVER_URL)
cmd = 'git config set --local ' + escape(key) + ' ' + escape(GITHUB_SERVER_URL)
result = os.popen(cmd)
cmd = 'git init'
os.popen(cmd)
cmd = 'git remote add origin ' + GITHUB_SERVER_URL + '/' + GITHUB_REPOSITORY
os.popen(cmd)