about summary refs log tree commit diff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-08-16 01:46:04 +0300
committerAzat Bahawi <azat@bahawi.net>2022-08-16 01:46:04 +0300
commit3cd06b22069c009b8c5fea2d5fad5f996667d2e3 (patch)
tree4b5f1cb453de13c560bc8aa5a57952713cf360aa /.gitlab-ci.yml
parentabsolute garbage wtf (diff)
huge update-o
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml27
1 files changed, 8 insertions, 19 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2242e13..2626dd7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,19 +1,16 @@
 ---
-image: nixpkgs/nix-flakes:nixos-21.11
-
-before_script:
-  - nix --version
-  - nix flake metadata
+image: nixpkgs/nix:nixos-22.05
 
 stages:
   - info
   - check
-  - cachix
+  - publish
 
 info:
   stage: info
   script:
-    - env
+    - nix --version
+    - nix flake metadata
     - nix show-config
     - nix show-derivation
 
@@ -21,19 +18,11 @@ check:
   stage: check
   script:
     - nix flake check --show-trace
-  allow_failure: true
 
-cachix:
-  stage: cachix
+publish:
+  stage: publish
   script:
     - set -o pipefail
     - nix build --print-build-logs --show-trace --json |
-      nix shell nixpkgs#jq
-      --command jq -r '.[].outputs | to_entries[].value' |
-      nix shell nixpkgs#cachix
-      --command cachix push $CACHIX_CACHE_NAME
-  artifacts:
-    paths:
-      - result
-    expire_in: 1 week
-    when: on_success
+      nix run nixpkgs#jq -- -r '.[].outputs | to_entries[].value' |
+      nix run nixpkgs#cachix -- push $CACHIX_CACHE_NAME

Consider giving Nix/NixOS a try! <3