ssh-action
ssh-action copied to clipboard
Duplicated output capture on the latest (1.2.3) version.
Describe the bug
I'm using capture_stdout, and prior to 1.2.3, it was captured only once, but latest duplicates output.
Yaml Config
jobs:
run-script:
runs-on: ubuntu-latest
outputs:
stdout: ${{ steps.set-output.outputs.stdout }}
steps:
- name: Run script on complynx.net
id: run-script
uses: appleboy/[email protected]
env:
...
with:
host: complynx.net
username: complynx
key: ${{ secrets.SERVER_SSH_KEY }}
capture_stdout: ${{ inputs.capture_stdout }}
command_timeout: 60m
envs: >
...
script: ${{ inputs.script }}
- name: Set output
if: ${{ inputs.capture_stdout }}
run: |
echo "${{ steps.run-script.outputs.stdout }}"|grep -v 'output: '
output_filtered=$(echo "${{ steps.run-script.outputs.stdout }}" | grep 'output: ' | sed 's/^output: //')
echo "stdout=$output_filtered" >> $GITHUB_OUTPUT
id: set-output
latest:
1.2.2:
@complynx Please help to try v1 or v1.2.4 (latest version)
https://github.com/appleboy/ssh-action/actions/runs/19767607937/job/56644140125
Checked right now, seems to work again.
Once again, got the same issue on the latest. 1.2.2 again worked fine.
I will take it.