diff --git a/action.yml b/action.yml index 09efa2b..e57effa 100644 --- a/action.yml +++ b/action.yml @@ -20,10 +20,9 @@ inputs: default: '22' runs: using: 'docker' - image: 'docker://liy36/ubuntu-ssh:24.04' steps: - - run: | - mkdir -p ~/.ssh/ - echo "${{ inputs.key }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh -o StrictHostKeyChecking=no -p ${{ inputs.port }} ${{ inputs.user }}@${{ inputs.host }} "${{ inputs.command }}" \ No newline at end of file + - name: Run SSH Command + uses: docker://liy36/ubuntu-ssh:24.04 + with: + entrypoint: /bin/bash + args: "-c 'mkdir -p ~/.ssh/ && echo \"${{ inputs.key }}\" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa && ssh -o StrictHostKeyChecking=no -p ${{ inputs.port }} ${{ inputs.user }}@${{ inputs.host }} \"${{ inputs.command }}\"'" \ No newline at end of file