summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.drone.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml
index 69f79f3..a785b21 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -9,10 +9,14 @@ steps:
     environment:
         KEY_DATA:
             from_secret: SSH_KEY_SECRET
+        KNOWN_HOSTS:
+            from_secret: KNOWN_HOSTS
     commands:
       # Ensure key data is not accidentally logged
       - apk update
       - apk add openssh
+      - mkdir ~/.ssh/
+      - echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
       - echo "$KEY_DATA" | tr -d '\r' > /tmp/drone_key  # Remove carriage returns (if any) and store in temp file
 
       - chmod 600 /tmp/drone_key  # Set strict permissions