diff --git a/.github/actions/build-matrix/action.yml b/.github/actions/build-matrix/action.yml index 7e384734449..ca23c2bf351 100644 --- a/.github/actions/build-matrix/action.yml +++ b/.github/actions/build-matrix/action.yml @@ -39,28 +39,28 @@ inputs: outputs: matrix: description: 'Build Matrix' - value: ${{ steps.build.outputs.matrix }} + value: ${{ steps.build-matrix.outputs.matrix }} skip-workflow: description: 'Skip workflow' value: ${{ inputs.skip-workflow }} client: description: 'Client files has changed' - value: ${{ steps.build.outputs.client }} + value: ${{ steps.build-changes.outputs.client }} common: description: 'Common files has changed' - value: ${{ steps.build.outputs.common }} + value: ${{ steps.build-changes.outputs.common }} server: description: 'Server files has changed' - value: ${{ steps.build.outputs.server }} + value: ${{ steps.build-changes.outputs.server }} workspaces: description: 'Workspaces files has changed' - value: ${{ steps.build.outputs.workspaces }} + value: ${{ steps.build-changes.outputs.workspaces }} e2e: description: 'E2E files has changed' - value: ${{ steps.build.outputs.e2e }} + value: ${{ steps.build-changes.outputs.e2e }} any: description: 'Any files has changed' - value: ${{ steps.build.outputs.any }} + value: ${{ steps.build-changes.outputs.any }} runs: using: 'composite' steps: @@ -68,7 +68,7 @@ runs: with: node-version: 14 - name: 'Check changes' - id: build + id: build-changes run: | CLIENT=false SERVER=false @@ -77,6 +77,11 @@ runs: E2E=false ANY=false if [[ "true" == "${{inputs.skip-workflow}}" ]]; then + echo "::set-output name=angular::false" + echo "::set-output name=react::false" + echo "::set-output name=vue::false" + echo "::set-output name=client-common::false" + echo "::set-output name=client::${CLIENT}" echo "::set-output name=server::${SERVER}" echo "::set-output name=common::${COMMON}" @@ -88,6 +93,11 @@ runs: fi if [[ "true" == "${{github.event.pull_request || 'true'}}" ]]; then + echo "::set-output name=angular::true" + echo "::set-output name=react::true" + echo "::set-output name=vue::true" + echo "::set-output name=client-common::true" + echo "::set-output name=client::true" echo "::set-output name=server::true" echo "::set-output name=common::true" @@ -176,36 +186,45 @@ runs: || WORKSPACES=true E2E=true ANY=true echo "::endgroup::" + echo "::set-output name=angular::${ANGULAR}" + echo "::set-output name=react::${REACT}" + echo "::set-output name=vue::${VUE}" + echo "::set-output name=client-common::${CLIENT_COMMON}" + + echo "::set-output name=client::${CLIENT}" + echo "::set-output name=server::${SERVER}" + echo "::set-output name=common::${COMMON}" + echo "::set-output name=workspaces::${WORKSPACES}" + echo "::set-output name=e2e::${E2E}" + echo "::set-output name=any::${ANY}" + shell: bash + + - name: 'Build matrix' + id: build-matrix + run: | echo '{ "include" : [] }' > matrix.json - if [[ "true" == "$ANGULAR" || "true" == "$CLIENT_COMMON" ]]; then + if [[ "true" == "${{ steps.build-changes.outputs.angular }}" || "true" == "${{ steps.build-changes.outputs.client-common }}" ]]; then echo "::group::Workflows Angular" test-integration/scripts/99-print-matrix.js generators/client/__workflow/${{ inputs.workflow-file-prefix }}-angular.json cat matrix.json echo "::endgroup::" fi - if [[ "true" == "$REACT" || "true" == "$CLIENT_COMMON" ]]; then + if [[ "true" == "${{ steps.build-changes.outputs.react }}" || "true" == "${{ steps.build-changes.outputs.client-common }}" ]]; then echo "::group::Workflows React" test-integration/scripts/99-print-matrix.js generators/client/__workflow/${{ inputs.workflow-file-prefix }}-react.json cat matrix.json echo "::endgroup::" fi - if [[ "true" == "$VUE" || "true" == "$CLIENT_COMMON" ]]; then + if [[ "true" == "${{ steps.build-changes.outputs.vue }}" || "true" == "${{ steps.build-changes.outputs.client-common }}" ]]; then echo "::group::Workflows Vue" test-integration/scripts/99-print-matrix.js generators/client/__workflow/${{ inputs.workflow-file-prefix }}-vue.json cat matrix.json echo "::endgroup::" fi - echo "::set-output name=client::${CLIENT}" - echo "::set-output name=server::${SERVER}" - echo "::set-output name=common::${COMMON}" - echo "::set-output name=workspaces::${WORKSPACES}" - echo "::set-output name=e2e::${E2E}" - echo "::set-output name=any::${ANY}" - MATRIX=$(cat matrix.json) rm matrix.json MATRIX="${MATRIX//'%'/'%25'}" diff --git a/.github/workflows/angular.yml b/.github/workflows/angular.yml index f293acd9ce0..e9a6f91358c 100644 --- a/.github/workflows/angular.yml +++ b/.github/workflows/angular.yml @@ -44,6 +44,7 @@ jobs: runs-on: ubuntu-20.04 outputs: matrix: ${{ steps.build.outputs.matrix }} + any: ${{ steps.build.outputs.any }} steps: - name: 'SETUP: Checkout generator-jhipster' uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/jdl.yml b/.github/workflows/jdl.yml index c5dc4ff557f..5e0d66ea831 100644 --- a/.github/workflows/jdl.yml +++ b/.github/workflows/jdl.yml @@ -40,6 +40,7 @@ jobs: runs-on: ubuntu-20.04 outputs: matrix: ${{ steps.build.outputs.matrix }} + any: ${{ steps.build.outputs.any }} steps: - name: 'SETUP: Checkout generator-jhipster' uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml index a0c873b0352..cf5ab3bbe35 100644 --- a/.github/workflows/react.yml +++ b/.github/workflows/react.yml @@ -44,6 +44,7 @@ jobs: runs-on: ubuntu-20.04 outputs: matrix: ${{ steps.build.outputs.matrix }} + any: ${{ steps.build.outputs.any }} steps: - name: 'SETUP: Checkout generator-jhipster' uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/vue.yml b/.github/workflows/vue.yml index ad7b907f3e2..7ebdaad2e03 100644 --- a/.github/workflows/vue.yml +++ b/.github/workflows/vue.yml @@ -44,6 +44,7 @@ jobs: runs-on: ubuntu-20.04 outputs: matrix: ${{ steps.build.outputs.matrix }} + any: ${{ steps.build.outputs.any }} steps: - name: 'SETUP: Checkout generator-jhipster' uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/webflux.yml b/.github/workflows/webflux.yml index 3cd05ae6806..1e96cf59b91 100644 --- a/.github/workflows/webflux.yml +++ b/.github/workflows/webflux.yml @@ -44,6 +44,7 @@ jobs: runs-on: ubuntu-20.04 outputs: matrix: ${{ steps.build.outputs.matrix }} + any: ${{ steps.build.outputs.any }} steps: - name: 'SETUP: Checkout generator-jhipster' uses: actions/checkout@v2.3.4