diff --git a/executor/cli/git.py b/executor/cli/git.py index c39e942..dd0e0c5 100644 --- a/executor/cli/git.py +++ b/executor/cli/git.py @@ -45,6 +45,9 @@ def handle_git(args): REPOSITORY = INPUT_REPOSITORY REF = INPUT_REF + data = f'https://{GITHUB_ACTOR}:{INPUT_TOKEN}@codex.r10x.net' + with open('/tmp/.git-credentials', 'w') as f: + f.write(data) #response = requests.get( # url='https://codex.r10x.net/api/v1/repos/meta/dsl', # headers={ @@ -79,6 +82,9 @@ def handle_git(args): result = os.popen(cmd) print(result.read()) + cmd = 'git config --global credential.helper store --file /tmp/.git-credentials' + exec_cmd(cmd) + cmd = f'git -C ' + INPUT_PATH + ' init' exec_cmd(cmd)