diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4a778f..3d51589 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -622,8 +622,8 @@ jobs: echo "======================================" sleep 2 - - id: stdout - name: ssh command with stdout + - id: stdout01 + name: ssh command with stdout 01 uses: ./ with: host: ${{ env.REMOTE_HOST }} @@ -641,13 +641,43 @@ jobs: echo "False" fi - - name: check stdout + - name: check stdout 01 run: | - echo "stdout: ${{ steps.stdout.outputs.stdout }}" - if echo "${{ steps.stdout.outputs.stdout }}" | grep -q "True"; then + echo "stdout: ${{ steps.stdout01.outputs.stdout }}" + if echo "${{ steps.stdout01.outputs.stdout }}" | grep -q "True"; then echo "Output contains 'True'" exit 1 fi - if echo "${{ steps.stdout.outputs.stdout }}" | grep -q "False"; then + if echo "${{ steps.stdout01.outputs.stdout }}" | grep -q "False"; then echo "Output contains 'False'" fi + + - id: stdout02 + name: ssh command with stdout 01 + uses: ./ + with: + host: ${{ env.REMOTE_HOST }} + username: linuxserver.io + password: password + port: 2222 + capture_stdout: true + script: | + #!/usr/bin/env bash + set -e + echo "TMP TESTING IF" + if [[ "1" == "1" ]]; then + echo "True" + else + echo "False" + fi + + - name: check stdout 02 + run: | + echo "stdout: ${{ steps.stdout02.outputs.stdout }}" + if echo "${{ steps.stdout02.outputs.stdout }}" | grep -q "False"; then + echo "Output contains 'False'" + exit 1 + fi + if echo "${{ steps.stdout02.outputs.stdout }}" | grep -q "True"; then + echo "Output contains 'True'" + fi