From c9a0ac700b574c23c2872e62bfb5c7900edd6338 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Wed, 15 May 2024 16:18:00 -0700 Subject: [PATCH] Always try to upload artifacts even if Nova jobs fail --- .github/workflows/linux_job.yml | 3 ++- .github/workflows/macos_job.yml | 5 +++-- .github/workflows/windows_job.yml | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux_job.yml b/.github/workflows/linux_job.yml index 64cfb08182..52c1b63509 100644 --- a/.github/workflows/linux_job.yml +++ b/.github/workflows/linux_job.yml @@ -259,6 +259,7 @@ jobs: ALPINE_IMAGE: ${{ inputs.runner == 'linux.arm64.2xlarge' && 'arm64v8/alpine' || '308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine' }} - name: Prepare artifacts for upload + if: always() working-directory: ${{ inputs.repository || github.repository }} id: check-artifacts env: @@ -290,7 +291,7 @@ jobs: - name: Upload artifacts to GitHub (if any) uses: actions/upload-artifact@v3 - if: ${{ inputs.upload-artifact != '' }} + if: ${{ always() && inputs.upload-artifact != '' }} with: name: ${{ inputs.upload-artifact }} path: ${{ runner.temp }}/artifacts/ diff --git a/.github/workflows/macos_job.yml b/.github/workflows/macos_job.yml index 857d9e850c..546322aa2c 100644 --- a/.github/workflows/macos_job.yml +++ b/.github/workflows/macos_job.yml @@ -168,7 +168,7 @@ jobs: shell: bash -l {0} working-directory: ${{ inputs.repository || github.repository }} id: check-artifacts - if: ${{ inputs.upload-artifact != '' }} + if: ${{ always() && inputs.upload-artifact != '' }} env: UPLOAD_ARTIFACT_NAME: ${{ inputs.upload-artifact }} run: | @@ -185,11 +185,12 @@ jobs: - name: Upload artifacts to GitHub (if any) uses: actions/upload-artifact@v3 - if: ${{ inputs.upload-artifact != '' }} + if: ${{ always() && inputs.upload-artifact != '' }} with: name: ${{ inputs.upload-artifact }} path: ${{ runner.temp }}/artifacts/ if-no-files-found: ${{ steps.check-artifacts.outputs.if-no-files-found }} + - name: Clean up disk space if: always() continue-on-error: true diff --git a/.github/workflows/windows_job.yml b/.github/workflows/windows_job.yml index 6b58dd545e..fe98ca28c4 100644 --- a/.github/workflows/windows_job.yml +++ b/.github/workflows/windows_job.yml @@ -170,7 +170,7 @@ jobs: shell: bash -l {0} working-directory: ${{ inputs.repository || github.repository }} id: check-artifacts - if: ${{ inputs.upload-artifact != '' }} + if: ${{ always() && inputs.upload-artifact != '' }} env: UPLOAD_ARTIFACT_NAME: ${{ inputs.upload-artifact }} run: | @@ -187,7 +187,7 @@ jobs: - name: Upload artifacts to GitHub (if any) uses: actions/upload-artifact@v3 - if: ${{ inputs.upload-artifact != '' }} + if: ${{ always() && inputs.upload-artifact != '' }} with: name: ${{ inputs.upload-artifact }} path: ${{ runner.temp }}/artifacts/