aboutsummaryrefslogtreecommitdiff
path: root/dhall/sr-ht-build.dhall
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/sr-ht-build.dhall')
-rw-r--r--dhall/sr-ht-build.dhall47
1 files changed, 47 insertions, 0 deletions
diff --git a/dhall/sr-ht-build.dhall b/dhall/sr-ht-build.dhall
new file mode 100644
index 0000000..41b937b
--- /dev/null
+++ b/dhall/sr-ht-build.dhall
@@ -0,0 +1,47 @@
+-- let buildTemplate =
+ λ ( repoName
+ : Text
+ )
+ → { image =
+ "debian/stretch"
+ , packages =
+ [ "curl" ]
+ , triggers =
+ [ { condition =
+ "failure"
+ , action =
+ "email"
+ , to =
+ "EuAndreh <eu@euandre.org>"
+ }
+ ]
+ , sources =
+ [ "https://git.sr.ht/~euandreh/" ++ repoName ]
+ , secrets =
+ [ "7159f943-811f-402d-bb6d-37cd764dc728" ]
+ , tasks =
+ [ { mapKey =
+ "setup"
+ , mapValue =
+ ''
+ curl https://nixos.org/nix/install | sh
+ echo '. $HOME/.nix-profile/etc/profile.d/nix.sh' >> $HOME/.buildenv''
+ },
+ { mapKey =
+ "test"
+ , mapValue =
+ ''
+ cd ${repoName}/
+ nix-build -A test''
+ },
+ { mapKey =
+ "publish"
+ , mapValue =
+ ''
+ cd ${repoName}/
+ nix-build -A publishScript
+ source env.sh
+ ./result/bin/publish.sh''
+ }
+ ]
+ }