GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — refactor: streamline output handling for GITHUB_OUTPUT in workflows by appleboy · Pull Request #404 · appleboy/ssh-action Conversation
Owner
Signed-off-by: appleboy [email protected]
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions- Write the stdout<<EOF and EOF markers directly to GITHUB_OUTPUT instead of using a group command - Simplify the process for capturing and appending command output to GITHUB_OUTPUT fix #403 fix #397 Signed-off-by: appleboy <[email protected]> - Add a check to ensure captured stdout is not empty - Add steps to capture and verify multiline stdout output - Add verification that specific lines and the username are present in captured output - Add steps to handle and verify stdout containing special characters and file paths Signed-off-by: appleboy <[email protected]> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewThis PR fixes a critical bug where stdout was being duplicated when Changes:
Reviewed changesCopilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+672
to
+682
|
| - name: check multiline output | ||
| run: | | ||
| echo "stdout: ${{ steps.stdout-multiline.outputs.stdout }}" | ||
| # Check if all lines are present | ||
| if ! echo "${{ steps.stdout-multiline.outputs.stdout }}" | grep -q "Line 1"; then | ||
| echo "Error: 'Line 1' not found in output" | ||
| exit 1 | ||
| fi | ||
| if ! echo "${{ steps.stdout-multiline.outputs.stdout }}" | grep -q "Line 2"; then | ||
| echo "Error: 'Line 2' not found in output" | ||
| exit 1 | ||
| fi | ||
| if ! echo "${{ steps.stdout-multiline.outputs.stdout }}" | grep -q "Line 3"; then | ||
| echo "Error: 'Line 3' not found in output" | ||
| exit 1 | ||
| fi | ||
| if ! echo "${{ steps.stdout-multiline.outputs.stdout }}" | grep -q "linuxserver.io"; then | ||
| echo "Error: username not found in output" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a test that explicitly verifies the output is not duplicated. Since this PR fixes issue #397 about duplicated output, it would be valuable to have a test that counts the occurrences of specific output lines to ensure they appear exactly once, not twice. For example, you could check that "Line 1" appears exactly once in the multiline output test.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- Add a step to verify that lines "Line 1", "Line 2", and "Line 3" each appear exactly once in the multiline output - Fail the workflow if any line is missing or duplicated - Confirm successful validation with a message when no duplicates are found Signed-off-by: appleboy <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Duplicated output capture on the latest (1.2.3) version.
There was an error while loading. Please reload this page.