From 01195efa338edd39304da53b64e15a5b42b906b3 Mon Sep 17 00:00:00 2001
From: Daniel Firth <dan.firth@horizon-haskell.net>
Date: Wed, 29 May 2024 10:49:10 +0000
Subject: [PATCH] CI: add explicit cachix step

---
 .gitlab-ci.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d3203c9e..d2dda01e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
 stages:
 - build
 - devour
+- cachix
 
 build:
   stage: build
@@ -41,3 +42,15 @@ devour:
       - SYSTEM:
          - aarch64-darwin
          - x86_64-linux
+
+cachix:
+  stage: cachix
+  rules:
+    - if: $CI_COMMIT_REF_PROTECTED == "true"
+  script:
+    - nix-shell -p cachix --command "nix build github:srid/devour-flake#packages.$SYSTEM.default -L --no-link --print-out-paths --override-input flake . | xargs cat | cachix push horizon"
+  parallel:
+    matrix:
+      - SYSTEM:
+         - aarch64-darwin
+         - x86_64-linux
-- 
GitLab