Files
commonDeploy/remote-command/action.yml
2026-04-30 20:18:50 +09:00

29 lines
555 B
YAML

name: 원격 명령어 실행
description: 원격 서버에서 명령어를 실행
inputs:
host:
required: true
port:
required: false
default: "22"
user:
required: true
key-path:
required: false
default: ~/.ssh/deploy_key
command:
required: true
runs:
using: composite
steps:
- shell: bash
run: |
set -eu
ssh -p ${{ inputs.port }} -i "${{ inputs.key-path }}" \
"${{ inputs.user }}@${{ inputs.host }}" \
'bash -se' << 'EOF'
${{ inputs.command }}
EOF