summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCrystal <crystal@wizard.tower>2024-04-19 19:27:22 +0100
committerCrystal <crystal@wizard.tower>2024-04-19 19:27:22 +0100
commita183a1df21b9ae17ac4b143d98c7d31043ca4059 (patch)
tree2a7154358c7ab32ea694c1ee911cc25375db5f49
parentbc95ff384ada9cd58cfd97c5a4b7a4423d39f444 (diff)
downloadwww-a183a1df21b9ae17ac4b143d98c7d31043ca4059.tar.gz
drone.yml update
-rw-r--r--.drone.yml20
1 files changed, 8 insertions, 12 deletions
diff --git a/.drone.yml b/.drone.yml
index 082e37a..5dde049 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -6,23 +6,19 @@ steps:
   - name: ssh_execute
     image: alpine:latest  # Lightweight base image (adjust if needed)
     # Fetch the private key securely from Drone secrets
-    script: |
-      set -e  # Exit on failure
-
-      # Replace 'SSH_KEY_SECRET' with the actual secret name in Drone
-      KEY_DATA=$(drone secret get SSH_KEY_SECRET)
+    commands:
+      - KEY_DATA=$(drone secret get SSH_KEY_SECRET)
       # Ensure key data is not accidentally logged
-      echo "$KEY_DATA" | tr -d '\r' > /tmp/drone_key  # Remove carriage returns (if any) and store in temp file
+      - 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
-      eval "$(ssh-agent -s)"  # Start SSH agent
+      - chmod 600 /tmp/drone_key  # Set strict permissions
+      - eval "$(ssh-agent -s)"  # Start SSH agent
 
       # Add the private key to the agent securely
-      ssh-add /tmp/drone_key
+      - ssh-add /tmp/drone_key
 
       # Replace with actual server details (host, username, command)
-      ssh crystal@tilde.institute -i /tmp/drone_key "touch hello_im_emu"
+      - ssh crystal@tilde.institute -i /tmp/drone_key "touch hello_im_emu"
 
       # Clean up after use
-      rm -f /tmp/drone_key  # Remove temporary key file
-
+      - rm -f /tmp/drone_key  # Remove temporary key file