Skip to content

Commit

Permalink
Support setting nix_path (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
zupo authored Aug 10, 2023
1 parent 5caa0e4 commit 1b9de42
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,27 @@ This GitHub Action sets nix for use in CI.
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
```
By default, this action assumes that:
* You are using the `niteo` cachix cache.
* You have `./nix/default.nix` in your repo where nix can find nixpkgs.

You can set your project specific values like so:

```yaml
- name: Configure nix
uses: teamniteo/gha-actions/nix@main
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
cache: myproject
nix_path: nixpkgs=nixos-unstable
```


# Uncommited changes Action

This GitHub Action checks if there are uncommited or not ignored files present after the steps ran.

```yaml
- name: Check for uncommitted-changes
uses: teamniteo/gha-actions/uncommitted-changes@main
```
```
10 changes: 6 additions & 4 deletions nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ description:
derivations to cache

inputs:
cache:
default: niteo
auth_token:
required: true
cache:
default: niteo
nix_path:
default: nixpkgs=./nix/default.nix


runs:
using: "composite"
steps:
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
nix_path: ${{ inputs.nix_path }}

- uses: cachix/cachix-action@v12
with:
name: ${{ inputs.cache }}
Expand Down

0 comments on commit 1b9de42

Please sign in to comment.