diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6862ae4635..58175f624b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -117,11 +117,20 @@ jobs: run: ./ci/docker-cleanup.sh - name: Omit produced artifacts from build cache run: rm -r ~/.m2/repository/org/hibernate/search + # Workaround for https://github.com/actions/upload-artifact/issues/240 + - name: List build reports to upload (if build failed) + # The weird syntax is because we're setting a multiline environment variable + # See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string + run: | + { + echo 'reportPaths<> "$GITHUB_ENV" - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 if: ${{ failure() || cancelled() }} with: name: ${{ format('build-reports-{0}', github.job) }} - path: | - ./**/*-reports/ - retention-days: 2 + path: ${{ env.reportPaths }} + retention-days: 7