initial commit
This commit is contained in:
commit
8d243a86dd
2 changed files with 30 additions and 0 deletions
23
action.yml
Normal file
23
action.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: "ssh-setup"
|
||||
description: "add a private ssh key"
|
||||
inputs:
|
||||
ssh-key:
|
||||
description: "private ssh key"
|
||||
required: true
|
||||
add-hosts:
|
||||
description: "~/.ssh/known_hosts"
|
||||
required: false
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: mkdir -p ~/.ssh
|
||||
shell: bash
|
||||
run: mkdir -p ~/.ssh
|
||||
- name: add hosts
|
||||
shell: bash
|
||||
run: echo "${{ inputs.add-hosts }}" | xargs ssh-keyscan > ~/.ssh/known_hosts
|
||||
- name: add ssh key
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ inputs.ssh-key }}" | tr -d "\r" > ~/.ssh/id_ed25519
|
||||
chmod -R 600 /root/.ssh
|
||||
Loading…
Add table
Add a link
Reference in a new issue