Use access token for pushing
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-06-05 22:54:16 +02:00
parent f4c2da894b
commit 743600b94e
Signed by: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 8 additions and 2 deletions

View File

@ -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")