Skip to content

Commit

Permalink
adjust build-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Mar 15, 2024
1 parent 0782801 commit 1393d90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/actions/build-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ inputs:
}}
outputs:
matrix:
description: 'Build Matrix'
description: 'Build matrix'
value: ${{ steps.build-matrix.outputs.matrix }}
empty-matrix:
description: 'Build matrix is empty'
value: ${{ steps.build-matrix.outputs.empty-matrix }}
skip-workflow:
description: 'Skip workflow'
value: ${{ inputs.skip-workflow }}
Expand Down Expand Up @@ -135,5 +138,8 @@ runs:
cat matrix.json >> $GITHUB_OUTPUT
echo '' >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
EMPTY_MATRIX=$(cat matrix.json | jq '.include | length == 0')
echo "empty-matrix=${EMPTY_MATRIX}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
rm matrix.json
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/devserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.build.outputs.matrix }}
client: ${{ steps.build.outputs.client }}
empty-matrix: ${{ steps.build.outputs.empty-matrix }}
steps:
- name: 'SETUP: Checkout generator-jhipster'
uses: actions/checkout@v4
Expand All @@ -64,7 +64,7 @@ jobs:
strategy:
fail-fast: false
matrix: ${{fromJson(needs.build-matrix.outputs.matrix)}}
if: needs.build-matrix.outputs.client == 'true'
if: needs.build-matrix.outputs.empty-matrix != 'true'
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
Expand Down

0 comments on commit 1393d90

Please sign in to comment.