2023-01-13 10:23:15 -08:00
|
|
|
# Nix Installer Action
|
|
|
|
|
2023-01-13 10:53:14 -08:00
|
|
|
You can use [`nix-installer`](https://github.com/DeterminateSystems/nix-installer) as a Github action like so:
|
2023-01-13 10:23:15 -08:00
|
|
|
|
|
|
|
```yaml
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lints:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install Nix
|
2023-01-17 12:01:54 -03:00
|
|
|
uses: DeterminateSystems/nix-installer-action@main
|
2023-01-13 10:23:15 -08:00
|
|
|
- name: Run `nix build`
|
|
|
|
run: nix build .
|
|
|
|
```
|
2023-01-13 10:35:23 -08:00
|
|
|
|
2023-01-17 12:01:54 -03:00
|
|
|
See [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for a full example.
|