only push if successful build

This commit is contained in:
Daylin Morgan 2025-01-19 19:29:48 -06:00
parent 75fc07a29a
commit b2d7a3a70d
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -389,16 +389,17 @@ proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: i
if isCi(): if isCi():
reportResults(results) reportResults(results)
# TODO: push after build not at once? if outs.len > 0:
var cmd = service # TODO: push after build not at once?
cmd.addArg "push" var cmd = service
cmd.addArg name cmd.addArg "push"
cmd.addArg "--jobs" cmd.addArg name
cmd.addArg $jobs cmd.addArg "--jobs"
cmd.addArgs outs cmd.addArg $jobs
let pushErr = runCmd(cmd) cmd.addArgs outs
if pushErr != 0: let pushErr = runCmd(cmd)
errorQuit "failed to push build to cache" if pushErr != 0:
errorQuit "failed to push build to cache"
proc getUpdatedLockFile() = proc getUpdatedLockFile() =
info "getting updated flake.lock as updated.lock" info "getting updated flake.lock as updated.lock"