26
remote-command/action.yml
Normal file
26
remote-command/action.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: 원격 명령어 실행
|
||||||
|
description: 원격 서버에서 명령어를 실행
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
host:
|
||||||
|
required: true
|
||||||
|
user:
|
||||||
|
required: true
|
||||||
|
key-path:
|
||||||
|
required: false
|
||||||
|
default: ~/.ssh/deploy_key
|
||||||
|
command:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- shell: bash
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
ssh -i "${{ inputs.key-path }}" \
|
||||||
|
"${{ inputs.user }}@${{ inputs.host }}" \
|
||||||
|
'bash -se' << 'EOF'
|
||||||
|
${{ inputs.command }}
|
||||||
|
EOF
|
||||||
Reference in New Issue
Block a user