Skip to content

Commit 62c40d7

Browse files
authored
Merge pull request #11 from numtide/gitlab-ci
add gitlab ci
2 parents 517604c + 634bdd9 commit 62c40d7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.gitlab-ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
stages:
2+
- build
3+
4+
variables:
5+
NIX_CONFIG: |
6+
extra-substituters = https://cache.numtide.com
7+
extra-trusted-public-keys = niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g=
8+
9+
build:
10+
stage: build
11+
image: nixos/nix:latest
12+
id_tokens:
13+
NIKS3_TOKEN:
14+
aud: https://niks3.numtide.com
15+
script:
16+
- nix build --log-format bar-with-logs --extra-experimental-features "nix-command flakes"
17+
- |
18+
curl -fsSL "https://github.com/Mic92/niks3/releases/latest/download/niks3_$(uname -s)_$(uname -m).tar.gz" | tar -xzf -
19+
./niks3 push \
20+
--server-url https://niks3.numtide.com \
21+
--auth-token "$NIKS3_TOKEN" \
22+
./result
23+
- nix develop --extra-experimental-features "nix-command flakes" -c just lint
24+
- nix flake check --log-format bar-with-logs --extra-experimental-features "nix-command flakes"
25+
rules:
26+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
27+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
28+
- if: $CI_PIPELINE_SOURCE == "web"

0 commit comments

Comments
 (0)