22 lines
483 B
YAML
22 lines
483 B
YAML
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
|