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 28
28
with :
29
29
version : latest
30
30
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
32
32
- name : " Use output (check)"
33
33
run : |
34
34
target='${{ steps.use-output.outputs.output }}'
@@ -40,13 +40,33 @@ jobs:
40
40
exit 1
41
41
fi
42
42
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
+
43
63
- name : " Use multiline output"
44
64
id : use-multiline-output
45
65
uses : ./
46
66
with :
47
67
version : latest
48
68
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
50
70
- name : " Use output (check)"
51
71
run : |
52
72
target='${{ steps.use-multiline-output.outputs.output }}'
Original file line number Diff line number Diff line change 90
90
${INPUT_MODULE:+-m $INPUT_MODULE} \
91
91
$ARGS; } | tee "${tmpout}"
92
92
93
- (echo -n "stdout=" && cat "${tmpout}") >> "$GITHUB_OUTPUT"
93
+ {
94
+ # we need a delim that doesn't appear in the output - a hash of the
95
+ # file itself *probably* won't (if it does, we have larger
96
+ # cryptographic problems)
97
+ delim="$(sha256sum $tmpout | cut -d " " -f1)"
98
+ echo "stdout<<${delim}"
99
+ cat "${tmpout}"
100
+ echo
101
+ echo "${delim}"
102
+ } >> "$GITHUB_OUTPUT"
94
103
95
104
- if : (inputs.call != '' || inputs.args != '') && inputs.engine-stop == 'true'
96
105
shell : bash
You can’t perform that action at this time.
0 commit comments