diff --git a/bin/github-sync.py b/bin/github-sync.py index e537d1b..3cb607d 100755 --- a/bin/github-sync.py +++ b/bin/github-sync.py @@ -4,7 +4,7 @@ # # Mirror repositories to Github (Fuck M$, get it straight) -from os import chdir, listdir +from os import chdir, environ, listdir from abralib import ( CLONES_PATH, @@ -31,10 +31,16 @@ def main(): log.info(f"Mirroring {app}...") + token = environ.get("GITHUB_ACCESS_TOKEN") + remote = ( + f"https://decentral1se:{token}@github.com/Autonomic-Cooperative/{app}.git" + ) + _run_cmd( - f"git remote add github git@github.com:Autonomic-Cooperative/{app}.git || true", + f"git remote add github {remote} || true", shell=True, ) + _run_cmd("git push github --all")