Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Mar 23, 2024
1 parent 6e781c6 commit 2a3965d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add new config `nixci.*.*.systems` acting as a whitelist of systems to build that subflake.
- Add `--build-systems` option to build on an arbitrary systems (\#39)
- Allow selecting sub-flake to build, e.g.: `nixci .#default.myflake` (\#45)
- Add subcommand to generate Github Actions matrix (\#50)
- Fixes
- Fix regression in Nix 2.19+ (`devour-flake produced an outpath with no outputs`) (\#35)
- Evaluate OS configurations for current system only (\#38)
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ $ nixci .#default.dev

### Using in Github Actions

#### Standard Runners

Add the following to your workflow file,

```yaml
Expand All @@ -58,6 +60,28 @@ Add the following to your workflow file,
- run: nixci
```
#### Self-hosted Runners with Job Matrix
```yaml
jobs:
configure:
runs-on: self-hosted
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: echo "matrix=$(nixci dump-github-actions-matrix --systems=aarch64-linux,aarch64-darwin | jq -c .)" >> $GITHUB_OUTPUT
nix:
runs-on: self-hosted
needs: configure
strategy:
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- run: nixci build --build-systems "github:nix-systems/${{ matrix.system }}" .#default.${{ matrix.subflake}}
```
## Configuring
By default, `nixci` will build the top-level flake, but you can tell it to build sub-flakes by adding the following output to your top-level flake:
Expand Down

0 comments on commit 2a3965d

Please sign in to comment.