Compare commits

...

5 Commits
v19 ... v20

Author SHA1 Message Date
29bd9290ef Merge pull request #163 from cachix/fix-nix-2.14
Support new Nix 2.14 profile PATH
2023-03-01 13:52:04 +08:00
167742cb88 don't insist $USER needs to be set 2023-03-01 05:51:32 +00:00
3755e30bd2 Support new Nix 2.14 profile PATH 2023-03-01 05:44:36 +00:00
193b0d85f5 Merge pull request #159 from cachix/update-readme
Update README for v19
2023-02-08 19:35:22 +07:00
cb6121cc54 Update README for v19 2023-02-06 15:00:46 +00:00
2 changed files with 6 additions and 25 deletions

View File

@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18 - uses: cachix/install-nix-action@v19
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build - run: nix-build
@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18 - uses: cachix/install-nix-action@v19
with: with:
github_access_token: ${{ secrets.GITHUB_TOKEN }} github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix build - run: nix build
@ -120,29 +120,9 @@ Otherwise, you can add any binary cache to nix.conf using
install-nix-action's own `extra_nix_config` input: install-nix-action's own `extra_nix_config` input:
```yaml ```yaml
- uses: cachix/install-nix-action@v18 - uses: cachix/install-nix-action@v19
with: with:
extra_nix_config: | extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://hydra.iohk.io https://cache.nixos.org/ substituters = https://hydra.iohk.io https://cache.nixos.org/
``` ```
## Hacking
Install the dependencies
```bash
$ yarn install
```
Build the typescript
```bash
$ yarn build
```
Run the tests :heavy_check_mark:
```bash
$ yarn test
```

View File

@ -20,7 +20,7 @@ add_config() {
# Set jobs to number of cores # Set jobs to number of cores
add_config "max-jobs = auto" add_config "max-jobs = auto"
# Allow binary caches for user # Allow binary caches for user
add_config "trusted-users = root $USER" add_config "trusted-users = root ${USER:-}"
# Add github access token # Add github access token
if [[ -n "${INPUT_GITHUB_ACCESS_TOKEN:-}" ]]; then if [[ -n "${INPUT_GITHUB_ACCESS_TOKEN:-}" ]]; then
add_config "access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN" add_config "access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN"
@ -88,7 +88,8 @@ fi
# Set paths # Set paths
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH" # new path for nix 2.14
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"
if [[ $INPUT_NIX_PATH != "" ]]; then if [[ $INPUT_NIX_PATH != "" ]]; then
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV" echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"