Skip to content

Commit

Permalink
CI: use DetSys Nix Installer action
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Oct 20, 2023
1 parent 06e265a commit 684ba80
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 32 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ jobs:
- uses: actions/checkout@v4
name: Checkout

- uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
auto-optimise-store = true
experimental-features = nix-command flakes
nix_path: nixpkgs=channel:nixos-unstable
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- uses: cachix/cachix-action@v12
with:
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,17 @@ jobs:
remove-dotnet: true
remove-haskell: true

- uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
auto-optimise-store = true
experimental-features = nix-command flakes
nix_path: nixpkgs=channel:nixos-unstable
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- uses: actions/checkout@v4
name: Checkout

- name: Set default git branch (to reduce log spam)
run: git config --global init.defaultBranch main

- name: Validate Flake
run: nix flake check

- name: Build neovim-flake with default settings
- name: Build documentation packages
run: nix build .#${{ matrix.package }} --print-build-logs

- name: Upload doc artifacts
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,25 @@ jobs:
name: Validate Flake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: nix flake check
- name: Checkout
uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Check Flake
run: nix flake check

format-with-alejandra:
name: Formatting via Alejandra
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
install_url: https://nixos.org/nix/install
extra_nix_config: |
auto-optimise-store = true
experimental-features = nix-command flakes
- name: Checkout
uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- run: nix run nixpkgs#alejandra -- -c .
3 changes: 2 additions & 1 deletion .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v18
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Build
run: |
Expand Down

0 comments on commit 684ba80

Please sign in to comment.