File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 63
63
strategy :
64
64
matrix :
65
65
include : " ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}"
66
+ if : " fromJSON(needs.calculate_matrix.outputs.jobs)[0] != null"
66
67
defaults :
67
68
run :
68
69
shell : " ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}"
Original file line number Diff line number Diff line change @@ -373,6 +373,14 @@ jobs:
373
373
matrix :
374
374
# Check the `calculate_matrix` job to see how is the matrix defined.
375
375
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
376
384
377
385
master :
378
386
name : master
You can’t perform that action at this time.
0 commit comments