initial commit

This commit is contained in:
toufic ar 2026-01-27 06:03:19 +02:00
commit 8d243a86dd
Signed by: toufic ar
SSH key fingerprint: SHA256:/NaO5I1nG3gYKzrzSiTYIdRyaIYxDWfr1U+d+yfJ/4k
2 changed files with 30 additions and 0 deletions

23
action.yml Normal file
View 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