File tree Expand file tree Collapse file tree 5 files changed +27
-1
lines changed Expand file tree Collapse file tree 5 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 30
30
31
31
outputs :
32
32
result : " ${{ steps.current.outputs.result }}"
33
+ outcome : " ${{ steps.current.outcome }}"
33
34
34
35
assert :
35
36
runs-on : ubuntu-latest
40
41
expected : ' {"result":"one"}'
41
42
actual : " ${{ needs.test.outputs.result }}"
42
43
44
+ - uses : nick-fields/assert-action@v1
45
+ with :
46
+ expected : ' success'
47
+ actual : " ${{ needs.test.outputs.outcome }}"
48
+
49
+
43
50
- uses : nick-fields/assert-action@v1
44
51
with :
45
52
expected : ' one'
Original file line number Diff line number Diff line change 52
52
53
53
outputs :
54
54
result : " ${{ steps.current.outputs.result }}"
55
+ outcome : " ${{ steps.current.outcome }}"
55
56
56
57
assert :
57
58
runs-on : ubuntu-latest
62
63
expected : ' 2'
63
64
actual : " ${{ needs.test.outputs.result }}"
64
65
66
+ - uses : nick-fields/assert-action@v1
67
+ with :
68
+ expected : ' success'
69
+ actual : " ${{ needs.test.outputs.outcome }}"
65
70
66
71
teardown :
67
72
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 29
29
echo "result=$(ls | wc -l)" >> $GITHUB_OUTPUT
30
30
31
31
outputs :
32
+ outcome : " ${{ steps.current.outcome }}"
32
33
result : " ${{ steps.current.outputs.result }}"
33
34
34
35
assert :
40
41
expected : ' 2'
41
42
actual : " ${{ needs.test.outputs.result }}"
42
43
44
+ - uses : nick-fields/assert-action@v1
45
+ with :
46
+ expected : ' success'
47
+ actual : " ${{ needs.test.outputs.outcome }}"
48
+
43
49
teardown :
44
50
runs-on : ubuntu-latest
45
51
needs : [assert]
Original file line number Diff line number Diff line change 94
94
echo "result=$(ls | wc -l)" >> $GITHUB_OUTPUT
95
95
96
96
outputs :
97
+ outcome : " ${{ steps.current.outcome }}"
97
98
result : " ${{ steps.current.outputs.result }}"
98
99
99
100
assert :
@@ -105,6 +106,11 @@ jobs:
105
106
expected : ' 2'
106
107
actual : " ${{ needs.test.outputs.result }}"
107
108
109
+ - uses : nick-fields/assert-action@v1
110
+ with :
111
+ expected : ' success'
112
+ actual : " ${{ needs.test.outputs.outcome }}"
113
+
108
114
109
115
teardown :
110
116
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 32
32
return
33
33
}
34
34
35
+ const matrix_mode = ! isEmptyInput ( step_name ) && ! isEmptyInput ( matrix_key )
36
+
35
37
if ( ! isEmptyInput ( outputs ) ) {
36
38
try {
37
39
yaml . parse ( outputs )
@@ -61,7 +63,7 @@ ${error}`;
61
63
62
64
core . setOutput ( 'result' , JSON . stringify ( outputs_struct ) )
63
65
64
- if ( ! isEmptyInput ( outputs ) ) {
66
+ if ( ! isEmptyInput ( outputs ) && matrix_mode ) {
65
67
const artifact_content = isEmptyInput ( matrix_key ) ? outputs_struct : { [ matrix_key ] : outputs_struct }
66
68
67
69
fs . writeFileSync ( "./" + step_name , JSON . stringify ( artifact_content ) ) ;
You can’t perform that action at this time.
0 commit comments