From ebeba89c7114ad53dbb930933546130224950525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Thu, 21 Sep 2023 16:34:00 +0200 Subject: [PATCH] Fix GitHub Actions build reports on Windows --- .github/workflows/build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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