From 5cd6098601add40077c75c90985b6f3ed83dab3b Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Thu, 6 Jan 2022 19:58:53 +0100 Subject: [PATCH] Provide ssh key for CI/CD --- .drone.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.drone.yml b/.drone.yml index 38dbaa0..bd69b8d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,15 @@ steps: - echo '${DRONE_COMMIT:0:8},latest' > .tags - name: clone-submodules image: alpine/git + environment: + SSH_KEY: + from_secret: ssh_git_key commands: + - mkdir -p /root/.ssh + - echo "$${SSH_KEY}" > /root/.ssh/id_rsa + - chmod 600 /root/.ssh/id_rsa + - ssh-keyscan github.com > /root/.ssh/known_hosts + - ssh-keyscan git.c0ntroller.de >> /root/.ssh/known_hosts - git submodule update --init --recursive - name: build-image image: plugins/docker