diff --git a/.drone.yml b/.drone.yml index 3278812f..3d01ef2e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,7 +20,8 @@ steps: HOME: /root commands: - git clone -b devos https://git.b12f.io/pub-solar/os . - - git remote add devos https://git.b12f.io/pub-solar/devos + - ./.drone/setup_ssh.sh + - git remote add devos git@git.b12f.io:pub-solar/devos - git fetch --all - git merge -X theirs devos/core - git push origin devos @@ -42,6 +43,7 @@ steps: from_secret: gitea_ssh_key HOME: /root commands: + - ./.drone/setup_ssh.sh - git fetch --all - git checkout --track origin/core - git merge origin/devos diff --git a/.drone/setup_ssh.sh b/.drone/setup_ssh.sh index c43f1063..05424e4c 100755 --- a/.drone/setup_ssh.sh +++ b/.drone/setup_ssh.sh @@ -1,7 +1,5 @@ #!/bin/bash # Setup ssh inside container -# This is a hack because nixery containers contain no passwd file, which openssh wants to read -echo "root:x:0:0:System administrator:/root:/run/current-system/sw/bin/bash" >> /etc/passwd mkdir -p ~/.ssh echo "$GITEA_SSH_KEY" > ~/.ssh/id_rsa echo "[git.b12f.io]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ4uaREL7acSSCNAX+voDYl1Kj7JipP62fR5x1UyGP9u" >> ~/.ssh/known_hosts