@@ -89,10 +89,11 @@ jobs:
8989 id : out
9090 with :
9191 matrix-step-name : php-version-and-artifact
92- matrix-key : ${{ matrix.php-version }}
92+ matrix-key : ${{ strategy.job-index }}
9393 outputs : |-
9494 version: ${{ matrix.php-version }}
9595 artifact: ${{ env.COVERAGE_ARTIFACT_NAME }}
96+ data: '{"version": "${{ matrix.php-version }}", "artifact": "${{ env.COVERAGE_ARTIFACT_NAME }}"}'
9697
9798 debug-output :
9899 name : DEBUG
@@ -106,7 +107,82 @@ jobs:
106107 with :
107108 matrix-step-name : php-version-and-artifact
108109
109- - run : echo "${{ steps.fetch-data.outputs.result }}"
110+ debug-output2 :
111+ name : DEBUG2
112+ runs-on : ubuntu-latest
113+ needs : [ debug-output ]
114+ strategy :
115+ matrix :
116+ data : ${{ fromJson(needs.debug-output.outputs.matrix).data.* }}
117+ steps :
118+ - name : matrix.data
119+ run : echo "${{ matrix.data }}"
120+ - name : fromJson(matrix.data)
121+ run : echo "${{ fromJson(matrix.data) }}"
122+ - name : fromJson(matrix.data).version
123+ run : echo "${{ fromJson(matrix.data).version }}"
124+
125+ debug-output2-2 :
126+ name : DEBUG2-2
127+ runs-on : ubuntu-latest
128+ needs : [ debug-output ]
129+ strategy :
130+ matrix :
131+ version : ${{ fromJson(needs.debug-output.outputs.matrix).version.* }}
132+ artifact : ${{ fromJson(needs.debug-output.outputs.matrix).artifact.* }}
133+ steps :
134+ - name : matrix.data
135+ run : echo "${{ matrix.data }}"
136+ - name : fromJson(matrix.data)
137+ run : echo "${{ fromJson(matrix.data) }}"
138+ - name : fromJson(matrix.data).version
139+ run : echo "${{ fromJson(matrix.data).version }}"
140+
141+ debug-output2-3 :
142+ name : DEBUG2-3
143+ runs-on : ubuntu-latest
144+ needs : [ debug-output ]
145+ strategy :
146+ matrix : ${{ fromJson(needs.debug-output.outputs.matrix) }}
147+ steps :
148+ - name : matrix.data
149+ run : echo "${{ matrix.data }}"
150+ - name : fromJson(matrix.data)
151+ run : echo "${{ fromJson(matrix.data) }}"
152+ - name : fromJson(matrix.data).version
153+ run : echo "${{ fromJson(matrix.data).version }}"
154+
155+ debug-output3 :
156+ name : DEBUG3
157+ runs-on : ubuntu-latest
158+ needs : [ debug-output ]
159+ steps :
160+ - name : needs.debug-output.outputs
161+ run : echo "${{ needs.debug-output.outputs }}"
162+ - name : toJson(needs.debug-output.outputs)
163+ run : echo "${{ toJson(needs.debug-output.outputs) }}"
164+ - name : needs.debug-output.outputs.matrix
165+ run : echo "${{ needs.debug-output.outputs.matrix }}"
166+ - name : toJson(needs.debug-output.outputs.matrix)
167+ run : echo "${{ toJson(needs.debug-output.outputs.matrix) }}"
168+ - name : fromJson(needs.debug-output.outputs.matrix)
169+ run : echo "${{ fromJson(needs.debug-output.outputs.matrix) }}"
170+ - name : fromJson(needs.debug-output.outputs.matrix).data
171+ run : echo "${{ fromJson(needs.debug-output.outputs.matrix) }}"
172+ - name : fromJson(needs.debug-output.outputs.matrix).data.*
173+ run : echo "${{ fromJson(needs.debug-output.outputs.matrix).* }}"
174+ - name : toJson(needs.debug-output.outputs.matrix.*)
175+ run : echo "${{ toJson(needs.debug-output.outputs.matrix.*) }}"
176+ - name : toJson(needs.debug-output.outputs.matrix).*
177+ run : echo "${{ toJson(needs.debug-output.outputs.matrix).* }}"
178+ - name : needs.debug-output.outputs.matrix.data
179+ run : echo "${{ needs.debug-output.outputs.matrix.data }}"
180+ - name : toJson(needs.debug-output.outputs.matrix).data
181+ run : echo "${{ toJson(needs.debug-output.outputs.matrix).data }}"
182+ - name : toJson(needs.debug-output.outputs.matrix.data.*)
183+ run : echo "${{ toJson(needs.debug-output.outputs.matrix.data.*) }}"
184+ - name : toJson(needs.debug-output.outputs.matrix).data.*
185+ run : echo "${{ toJson(needs.debug-output.outputs.matrix).data.* }}"
110186
111187# - uses: actions/download-artifact@v4
112188# with:
0 commit comments