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

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


The following commit(s) were added to refs/heads/v2 by this push:
     new 530f6af  Upload on failure
530f6af is described below

commit 530f6af556451b37fe8f9a6a1b63575de3884522
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Sun Jan 2 09:22:00 2022 +0100

    Upload on failure
---
 .github/workflows/maven-verify.yml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/.github/workflows/maven-verify.yml 
b/.github/workflows/maven-verify.yml
index c9023ec..0068150 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -105,6 +105,10 @@ on:
         default: true
         type: boolean
 
+      failure-upload-path:
+        description: A file, directory or wildcard pattern that describes what 
to upload on failure
+        required: false
+        type: string
 
 jobs:
 
@@ -137,6 +141,12 @@ jobs:
       - name: Build Maven Site
         run: ./mvnw --errors --batch-mode --show-version ${{ inputs.maven_args 
}} ${{ inputs.ff-site-goal }}
 
+      - name: Upload artifact on failure
+        uses: actions/[email protected]
+        if: failure() && inputs.failure-upload-path != ''
+        with:
+          name: failure-${{ inputs.ff-os }}-${{ inputs.ff-jdk }}-${{ 
inputs.ff-jdk-distribution }}
+          path: $${ inputs.failure-upload-path }}
 
   verify:
     needs: fail-fast-build
@@ -188,3 +198,10 @@ jobs:
       - name: Build Maven Site
         if: steps.should-run.conclusion == 'success'
         run: ./mvnw --errors --batch-mode --show-version ${{ inputs.maven_args 
}} ${{ inputs.verify-site-goal }}
+
+      - name: Upload artifact on failure
+        uses: actions/[email protected]
+        if: steps.should-run.conclusion == 'success' && failure() && 
inputs.failure-upload-path != ''
+        with:
+          name: failure-${{ matrix.os }}-${{ matrix.jdk }}-${{ 
matrix.distribution }}
+          path: $${ inputs.failure-upload-path }}

Reply via email to