Provide ssh key for CI/CD

This commit is contained in:
Daniel Kluge 2022-01-06 19:58:53 +01:00
parent 864d723c08
commit 5cd6098601

View File

@ -11,7 +11,15 @@ steps:
- echo '${DRONE_COMMIT:0:8},latest' > .tags - echo '${DRONE_COMMIT:0:8},latest' > .tags
- name: clone-submodules - name: clone-submodules
image: alpine/git image: alpine/git
environment:
SSH_KEY:
from_secret: ssh_git_key
commands: 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 - git submodule update --init --recursive
- name: build-image - name: build-image
image: plugins/docker image: plugins/docker