1 parent 98c6573 commit a165501Copy full SHA for a165501
1 file changed
src/job.ts
@@ -1408,8 +1408,9 @@ If you know what you're doing and would like to suppress this warning, use one o
1408
}
1409
1410
private async copyArtifactsOut (writeStreams: WriteStreams, expanded: {[key: string]: string}) {
1411
- // TODO: update the condition to support when:on_success / when:on_failure
1412
- if (this.jobStatus !== "success" && this.artifacts?.when !== "always") return;
+ if (this.jobStatus !== "success" && this.artifacts?.when === "on_success") return;
+ if (this.jobStatus !== "failed" && this.artifacts?.when === "on_failure") return;
1413
+ if (this.artifacts?.when === "never") return;
1414
if (!this.artifacts) return;
1415
if ((this.artifacts.paths?.length ?? 0) === 0 && this.artifacts.reports?.dotenv == null) return;
1416
0 commit comments