Add action

This commit is contained in:
Gijs Oortgiese
2025-08-22 10:35:15 +02:00
commit 8a932b754f

21
action.yaml Normal file
View File

@@ -0,0 +1,21 @@
name: SSH
inputs:
ssh-private-key:
required: true
ssh-known-hosts:
required: true
runs:
using: 'composite'
steps:
- name: Setup ssh
env:
SSH_PRIVATE_KEY: ${{ inputs.ssh-private-key }}
SSH_KNOWN_HOSTS: ${{ inputs.ssh-known-hosts }}
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/id_rsa