Skip to content

Commit

Permalink
Framework: Fix to handle empty matrix (#6369)
Browse files Browse the repository at this point in the history
  • Loading branch information
mreid-tt authored Jan 2, 2025
1 parent fcc74a8 commit 5fe5ba6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
needs: prepare
outputs:
matrix: ${{ steps.defaults.outputs.matrix }}
has_entries: ${{ steps.defaults.outputs.has_entries }}
steps:
- id: defaults
run: |
Expand Down Expand Up @@ -221,10 +222,14 @@ jobs:
# Output the final matrix
echo "matrix=$(echo $matrix | jq -c)" >> $GITHUB_OUTPUT
# Output if the matrix has entries
echo "has_entries=$(jq -e '.include | length > 0' <<< "$matrix" > /dev/null && echo true || echo false)" >> $GITHUB_OUTPUT
build:
name: Build
needs: [prepare, set-defaults]
runs-on: ubuntu-latest
if: ${{ needs.set-defaults.outputs.has_entries == 'true' }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.set-defaults.outputs.matrix) }}
Expand Down

0 comments on commit 5fe5ba6

Please sign in to comment.