Skip to content

Commit

Permalink
Upload on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Jan 2, 2022
1 parent e782bc6 commit 530f6af
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 530f6af

Please sign in to comment.