Skip to content

Commit 7f663e5

Browse files
committed
avoid artefact creation for cancelled jobs
1 parent c33de34 commit 7f663e5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/conda-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,14 @@ jobs:
182182
else
183183
export BLD_ARTIFACT_PREFIX="conda_pkgs"
184184
fi
185-
./.scripts/create_conda_build_artifacts.sh
185+
# we do not want to trigger artefact creation if the job is cancelled;
186+
# gate this on either explicit success or failure
187+
if [ $JOB_STATUS == "failure" || $JOB_STATUS == "success" ]; then
188+
./.scripts/create_conda_build_artifacts.sh
189+
else
190+
# skips upload steps below, which are gated on preparation success
191+
exit 1
192+
fi
186193
187194
- name: Store conda build artifacts
188195
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

0 commit comments

Comments
 (0)