This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 6363 strategy :
6464 matrix :
6565 include : " ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}"
66+ if : " fromJSON(needs.calculate_matrix.outputs.jobs)[0] != null"
6667 defaults :
6768 run :
6869 shell : " ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}"
Original file line number Diff line number Diff line change @@ -373,6 +373,14 @@ jobs:
373373 matrix :
374374 # Check the `calculate_matrix` job to see how is the matrix defined.
375375 include : ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
376+ # GitHub Actions fails the workflow if an empty list of jobs is provided to
377+ # the workflow, so we need to skip this job if nothing was produced by
378+ # the Python script.
379+ #
380+ # Unfortunately checking whether a list is empty is not possible in a nice
381+ # way due to GitHub Actions expressions limits.
382+ # This hack is taken from https://github.com/ferrocene/ferrocene/blob/d43edc6b7697cf1719ec1c17c54904ab94825763/.github/workflows/release.yml#L75-L82
383+ if : fromJSON(needs.calculate_matrix.outputs.jobs)[0] != null
376384
377385 master :
378386 name : master
You can’t perform that action at this time.
0 commit comments