diff --git a/remote-command/action.yml b/remote-command/action.yml new file mode 100644 index 0000000..053b245 --- /dev/null +++ b/remote-command/action.yml @@ -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 \ No newline at end of file