mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-07 17:44:28 +00:00
Support self-hosted runners and always skip adding a channel
This commit is contained in:
parent
5a2cbacfff
commit
775aed5fcb
4 changed files with 49 additions and 35 deletions
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
@ -15,28 +15,14 @@ jobs:
|
|||
- run: yarn build
|
||||
- name: Install Nix
|
||||
uses: ./
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-20.03
|
||||
- run: nix-env -iA cachix -f https://cachix.org/api/v1/install
|
||||
- run: cat /etc/nix/nix.conf
|
||||
# cachix should be available and be able to configure a cache
|
||||
- run: cachix use cachix
|
||||
- run: nix-build test.nix
|
||||
|
||||
no-channel:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn build
|
||||
- name: Install Nix
|
||||
uses: ./
|
||||
with:
|
||||
skip_adding_nixpkgs_channel: true
|
||||
- run: nix-build test.nix && exit 1 || echo "OK"
|
||||
- run: NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/tarball/ab5863afada3c1b50fc43bf774b75ea71b287cde nix-build test.nix
|
||||
|
||||
custom-nix-path:
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -64,7 +50,8 @@ jobs:
|
|||
- run: yarn build
|
||||
- name: Install Nix
|
||||
uses: ./
|
||||
with:
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-20.03
|
||||
extra_nix_config: |
|
||||
sandbox = relaxed
|
||||
- run: cat /etc/nix/nix.conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue