mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-11 17:50:08 +01:00
chore: add README
This commit is contained in:
parent
0df36ad437
commit
1b963cb641
1 changed files with 46 additions and 0 deletions
46
README.md
Normal file
46
README.md
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Nix Gitlab CI
|
||||||
|
|
||||||
|
Flake module which allows generating a `.gitlab-ci.yml` from Nix.
|
||||||
|
This allows easily using any Nix package in CI.
|
||||||
|
Also makes it possible to split CI parts in a separate module
|
||||||
|
which can be imported in multiple projects.
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```nix
|
||||||
|
# flake.nix
|
||||||
|
{
|
||||||
|
...
|
||||||
|
inputs.nix-gitlab-ci.url = "gitlab:TECHNOFAB/nix-gitlab-ci";
|
||||||
|
|
||||||
|
outputs = {...}: flake-parts.lib.mkFlake {...} {
|
||||||
|
imports = [
|
||||||
|
inputs.nix-gitlab-ci.flakeModule
|
||||||
|
];
|
||||||
|
...
|
||||||
|
|
||||||
|
perSystem = {...}: {
|
||||||
|
ci = {
|
||||||
|
stages = ["test"];
|
||||||
|
jobs = {
|
||||||
|
"test" = {
|
||||||
|
stage = "test";
|
||||||
|
deps = [pkgs.unixtools.ping];
|
||||||
|
script = [
|
||||||
|
"ping -c 5 8.8.8.8"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
```yaml
|
||||||
|
# .gitlab-ci.yml
|
||||||
|
include:
|
||||||
|
- project: TECHNOFAB/nix-gitlab-ci
|
||||||
|
ref: main
|
||||||
|
file: gitlab-ci.yml
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue