diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ea37ebee..1de74e94 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -89,10 +89,11 @@ jobs: id: out with: matrix-step-name: php-version-and-artifact - matrix-key: ${{ matrix.php-version }} + matrix-key: ${{ strategy.job-index }} outputs: |- version: ${{ matrix.php-version }} artifact: ${{ env.COVERAGE_ARTIFACT_NAME }} + data: '{"version": "${{ matrix.php-version }}", "artifact": "${{ env.COVERAGE_ARTIFACT_NAME }}"}' debug-output: name: DEBUG @@ -106,7 +107,109 @@ jobs: with: matrix-step-name: php-version-and-artifact - - run: echo "${{ steps.fetch-data.outputs.result }}" + debug-output2: + name: DEBUG2 + runs-on: ubuntu-latest + needs: [ debug-output ] + strategy: + matrix: + data: ${{ fromJson(needs.debug-output.outputs.matrix).data.* }} + steps: + - name: matrix.data + run: echo "${{ matrix.data }}" + - name: fromJson(matrix.data) + run: echo "${{ fromJson(matrix.data) }}" + - name: fromJson(matrix.data).version + run: echo "${{ fromJson(matrix.data).version }}" + + debug-output2-2: + name: DEBUG2-2 + runs-on: ubuntu-latest + needs: [ debug-output ] + strategy: + matrix: + version: ${{ fromJson(needs.debug-output.outputs.matrix).version.* }} + artifact: ${{ fromJson(needs.debug-output.outputs.matrix).artifact.* }} + steps: + - name: matrix.data + run: echo "${{ matrix }}" + - name: toJson(matrix) + run: echo "${{ toJson(matrix) }}" + - name: Full + run: echo "version=${{ matrix.version }} / artifact=${{ matrix.artifact }}" + + debug-output2-3: + name: DEBUG2-3 + runs-on: ubuntu-latest + needs: [ debug-output ] + strategy: + matrix: ${{ fromJson(needs.debug-output.outputs.matrix) }} + steps: + - name: matrix.data + run: echo "${{ matrix }}" + - name: toJson(matrix) + run: echo "${{ toJson(matrix) }}" + - name: Full + run: echo "version=${{ matrix.version }} / artifact=${{ matrix.artifact }} / data=${{ matrix.data }}" + + debug-output2-4: + name: DEBUG2-4 + runs-on: ubuntu-latest + needs: [ debug-output ] + strategy: + matrix: + include: ${{ fromJson(needs.debug-output.outputs.matrix).data }} + steps: + - name: matrix.data + run: echo "${{ matrix }}" + - name: toJson(matrix) + run: echo "${{ toJson(matrix) }}" + + debug-output2-3-2: + name: DEBUG2-3-2 + runs-on: ubuntu-latest + needs: [ debug-output ] + strategy: + matrix: ${{ needs.debug-output.outputs.matrix }} + steps: + - name: matrix.data + run: echo "${{ matrix }}" + - name: toJson(matrix) + run: echo "${{ toJson(matrix) }}" + - name: Full + run: echo "version=${{ matrix.version }} / artifact=${{ matrix.artifact }} / data=${{ matrix.data }}" + + debug-output4: + name: DEBUG4 + runs-on: ubuntu-latest + needs: [ debug-output ] + steps: + - name: needs.debug-output.outputs + run: echo "${{ needs.debug-output.outputs }}" + - name: toJson(needs.debug-output.outputs) + run: echo "${{ toJson(needs.debug-output.outputs) }}" + - name: needs.debug-output.outputs.matrix + run: echo "${{ needs.debug-output.outputs.matrix }}" + - name: toJson(needs.debug-output.outputs.matrix) + run: echo "${{ toJson(needs.debug-output.outputs.matrix) }}" + - name: fromJson(needs.debug-output.outputs.matrix) + run: echo "${{ fromJson(needs.debug-output.outputs.matrix) }}" + - name: fromJson(needs.debug-output.outputs.matrix).data + run: echo "${{ fromJson(needs.debug-output.outputs.matrix) }}" + - name: fromJson(needs.debug-output.outputs.matrix).data.* + run: echo "${{ fromJson(needs.debug-output.outputs.matrix).* }}" + - name: toJson(needs.debug-output.outputs.matrix.*) + run: echo "${{ toJson(needs.debug-output.outputs.matrix.*) }}" + - name: toJson(needs.debug-output.outputs.matrix).* + run: echo "${{ toJson(needs.debug-output.outputs.matrix).* }}" + - name: needs.debug-output.outputs.matrix.data + run: echo "${{ needs.debug-output.outputs.matrix.data }}" + - name: toJson(needs.debug-output.outputs.matrix).data + run: echo "${{ toJson(needs.debug-output.outputs.matrix).data }}" + - name: toJson(needs.debug-output.outputs.matrix.data.*) + run: echo "${{ toJson(needs.debug-output.outputs.matrix.data.*) }}" + - name: toJson(needs.debug-output.outputs.matrix).data.* + run: echo "${{ toJson(needs.debug-output.outputs.matrix).data.* }}" # - uses: actions/download-artifact@v4 # with: