File tree 2 files changed +32
-3
lines changed
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 83
83
${INPUT_MODULE:+-m $INPUT_MODULE} \
84
84
${{ inputs.args }}; } | tee "${tmpout}"
85
85
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"
87
96
88
97
- if : inputs.engine-stop == 'true'
89
98
shell : bash
You can’t perform that action at this time.
0 commit comments