mirror of
https://git.madhouse-project.org/actions/nix.git
synced 2024-11-23 20:19:16 +01:00
Add a README
Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
parent
b77e4125ee
commit
81d8c45ea2
1 changed files with 67 additions and 0 deletions
67
README.md
Normal file
67
README.md
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
actions/nix
|
||||||
|
===========
|
||||||
|
|
||||||
|
[![Build status][ci:badge]][ci:url]
|
||||||
|
|
||||||
|
[ci:badge]: https://ironforge.madhouse-project.org/actions/actions/nix/badge
|
||||||
|
[ci:url]: https://ironforge.madhouse-project.org/actions/actions/nix/latest-log
|
||||||
|
|
||||||
|
This repository provides a number of [Forgejo Actions][forgejo:action], all aimed at making it more pleasant to work with both Nix (either by running under NixOS, or using the Nix package manager on its own). The provided actions are listed below. All examples show the default inputs, unless otherwise specified. If the defaults are fine, those inputs can be safely omitted.
|
||||||
|
|
||||||
|
[forgejo:action]: https://forgejo.org/docs/latest/user/actions/
|
||||||
|
|
||||||
|
## `actions/nix/install`
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
- name: Install Nix on the host
|
||||||
|
uses: actions/nix/install@main
|
||||||
|
with:
|
||||||
|
install-url: "https://nixos.org/nix/install"
|
||||||
|
```
|
||||||
|
|
||||||
|
## `actions/nix/build`
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
- name: Build a Nix package
|
||||||
|
uses: actions/nix/build@main
|
||||||
|
with:
|
||||||
|
flake: .
|
||||||
|
package: # there's no default, Nix itself will fall back to "default"
|
||||||
|
logs: false
|
||||||
|
```
|
||||||
|
|
||||||
|
## `actions/nix/develop`
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
- name: Run something in a development environment
|
||||||
|
uses: actions/nix/develop@main
|
||||||
|
with:
|
||||||
|
flake: .
|
||||||
|
package: # no default, see above
|
||||||
|
run: |
|
||||||
|
# No default here, either!
|
||||||
|
```
|
||||||
|
|
||||||
|
The commands specified in the `run` input will be written to a shell script, and the shell script will be executed with `bash -eo pipefail`.
|
||||||
|
|
||||||
|
## `actions/nix/shell`
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
- name: Run something in a Nix shell
|
||||||
|
uses: actions/nix/shell@main
|
||||||
|
with:
|
||||||
|
flake: .
|
||||||
|
package: # no default, see above
|
||||||
|
run: |
|
||||||
|
# No default here, either!
|
||||||
|
```
|
||||||
|
|
||||||
|
The commands specified in the `run` input will be written to a shell script, and the shell script will be executed with `bash -eo pipefail`.
|
Loading…
Reference in a new issue