Skip to content

Commit b6dbd97

Browse files
committed
only upload ENV_ARTIFACT_PATH if build failed
1 parent 490113f commit b6dbd97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/conda-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
221221
- name: Store conda build artifacts
222222
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
223-
if: ${{ always() && steps.prepare-artifacts.outcome == 'success' }}
223+
if: ${{ steps.prepare-artifacts.outcome == 'success' }}
224224
with:
225225
name: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_NAME }}
226226
path: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_PATH }}
@@ -229,7 +229,8 @@ jobs:
229229

230230
- name: Store conda build environment artifacts
231231
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
232-
if: ${{ failure() && steps.prepare-artifacts.outcome == 'success' }}
232+
# only relevant if build failed, see above
233+
if: ${{ steps.determine-status.outputs.status == 'failure' && steps.prepare-artifacts.outcome == 'success' }}
233234
with:
234235
name: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_NAME }}
235236
path: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_PATH }}

0 commit comments

Comments
 (0)