This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch v4
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git


The following commit(s) were added to refs/heads/v4 by this push:
     new acda838  Allow to disable matrix build
acda838 is described below

commit acda838f5234a6638700abfccdc39a61bada19c5
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Wed Jul 3 00:02:10 2024 +0200

    Allow to disable matrix build
---
 .github/workflows/maven-verify-test.yml | 9 +++++++++
 .github/workflows/maven-verify.yml      | 8 +++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/maven-verify-test.yml 
b/.github/workflows/maven-verify-test.yml
index deab43f..8a1ada7 100644
--- a/.github/workflows/maven-verify-test.yml
+++ b/.github/workflows/maven-verify-test.yml
@@ -59,3 +59,12 @@ jobs:
       maven4-enabled: true
       ff-run: false
       verify-goal: verify
+
+  # test only fail fast job
+  verify-5:
+    name: Verify 5 - disable matrix build
+    uses: ./.github/workflows/maven-verify.yml
+    needs: verify-4
+    with:
+      ff-site-run: false
+      matrix-enabled: false
diff --git a/.github/workflows/maven-verify.yml 
b/.github/workflows/maven-verify.yml
index 5e921cb..ad8bec7 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -74,6 +74,12 @@ on:
         default: '[]'
         type: string
 
+      matrix-enabled:
+        description: Determinate if use matrix build
+        required: false
+        default: true
+        type: boolean
+
       max-parallel:
         description: max parallel jobs
         required: false
@@ -243,7 +249,7 @@ jobs:
   setup-matrix:
     runs-on: "ubuntu-latest"
     needs: fail-fast-build
-    if: always() && ( !inputs.ff-run || needs.fail-fast-build.result == 
'success' )
+    if: always() && inputs.matrix-enabled && ( !inputs.ff-run || 
needs.fail-fast-build.result == 'success' )
     outputs:
       maven: ${{ steps.maven.outputs.matrix }}
       exclude: ${{ steps.exclude.outputs.matrix }}

Reply via email to