Skip to content

Commit a165501

Browse files
author
Федотов Александр Сергеевич
committed
fix(job): support artifacts when field
1 parent 98c6573 commit a165501

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/job.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,8 +1408,9 @@ If you know what you're doing and would like to suppress this warning, use one o
14081408
}
14091409

14101410
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;
1411+
if (this.jobStatus !== "success" && this.artifacts?.when === "on_success") return;
1412+
if (this.jobStatus !== "failed" && this.artifacts?.when === "on_failure") return;
1413+
if (this.artifacts?.when === "never") return;
14131414
if (!this.artifacts) return;
14141415
if ((this.artifacts.paths?.length ?? 0) === 0 && this.artifacts.reports?.dotenv == null) return;
14151416

0 commit comments

Comments
 (0)