GitHub Actions show pipeline failed with red cross while all jobs succeeded

Looks like jobs with empty matrices pending forever and workflow run is marked failed.

here i found same problem Empty matrix fails workflow

This is mine solution:

..........
    strategy:
      fail-fast: false
      matrix: ${{ fromJSON( needs.generate_matrixes.outputs.matrix_macos ) }}
    if: ${{ fromJSON( needs.generate_matrixes.outputs.matrix_macos ).include[0] }}
.........