about summary refs log tree commit diff
path: root/.gitlab-ci.yml
blob: 2626dd753d19a776dbd14b28786753532d0535df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
image: nixpkgs/nix:nixos-22.05

stages:
  - info
  - check
  - publish

info:
  stage: info
  script:
    - nix --version
    - nix flake metadata
    - nix show-config
    - nix show-derivation

check:
  stage: check
  script:
    - nix flake check --show-trace

publish:
  stage: publish
  script:
    - set -o pipefail
    - nix build --print-build-logs --show-trace --json |
      nix run nixpkgs#jq -- -r '.[].outputs | to_entries[].value' |
      nix run nixpkgs#cachix -- push $CACHIX_CACHE_NAME

Consider giving Nix/NixOS a try! <3