ssh-action icon indicating copy to clipboard operation
ssh-action copied to clipboard

Duplicated output capture on the latest (1.2.3) version.

Open complynx opened this issue 1 month ago • 4 comments

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: Image

1.2.2: Image

complynx avatar Dec 04 '25 11:12 complynx

@complynx Please help to try v1 or v1.2.4 (latest version)

Image

https://github.com/appleboy/ssh-action/actions/runs/19767607937/job/56644140125

appleboy avatar Dec 05 '25 01:12 appleboy

Checked right now, seems to work again.

complynx avatar Dec 05 '25 18:12 complynx

Once again, got the same issue on the latest. 1.2.2 again worked fine.

complynx avatar Dec 09 '25 09:12 complynx

I will take it.

appleboy avatar Dec 09 '25 09:12 appleboy