File tree Expand file tree Collapse file tree 2 files changed +32
-3
lines changed
Expand file tree Collapse file tree 2 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 2828 with :
2929 version : latest
3030 verb : core
31- args : container from --address=alpine with-exec --args echo,"hello world" stdout
31+ args : container from --address=alpine with-exec --args echo,-n, "hello world" stdout
3232 - name : " Use output (check)"
3333 run : |
3434 target='${{ steps.use-output.outputs.output }}'
@@ -40,13 +40,33 @@ jobs:
4040 exit 1
4141 fi
4242
43+ - name : " Use trailing output"
44+ id : use-trailing-output
45+ uses : ./
46+ with :
47+ version : latest
48+ verb : core
49+ args : container from --address=alpine with-exec --args echo,-n,-e,"hello world\n" stdout
50+ - name : " Use output (check)"
51+ run : |
52+ target='${{ steps.use-trailing-output.outputs.output }}'
53+ result='hello world
54+ '
55+ if [[ "$target" == "$result" ]]; then
56+ echo "matches"
57+ exit 0
58+ else
59+ echo "does not match"
60+ exit 1
61+ fi
62+
4363 - name : " Use multiline output"
4464 id : use-multiline-output
4565 uses : ./
4666 with :
4767 version : latest
4868 verb : core
49- args : container from --address=alpine with-exec --args echo,-e,"hello\nworld" stdout
69+ args : container from --address=alpine with-exec --args echo,-n,- e,"hello\nworld" stdout
5070 - name : " Use output (check)"
5171 run : |
5272 target='${{ steps.use-multiline-output.outputs.output }}'
Original file line number Diff line number Diff line change 8383 ${INPUT_MODULE:+-m $INPUT_MODULE} \
8484 ${{ inputs.args }}; } | tee "${tmpout}"
8585
86- (echo -n "stdout=" && cat "${tmpout}") >> "$GITHUB_OUTPUT"
86+ {
87+ # we need a delim that doesn't appear in the output - a hash of the
88+ # file itself *probably* won't (if it does, we have larger
89+ # cryptographic problems)
90+ delim="$(sha256sum $tmpout | cut -d " " -f1)"
91+ echo "stdout<<${delim}"
92+ cat "${tmpout}"
93+ echo
94+ echo "${delim}"
95+ } >> "$GITHUB_OUTPUT"
8796
8897 - if : inputs.engine-stop == 'true'
8998 shell : bash
You can’t perform that action at this time.
0 commit comments