From 684ba80157636a4a34abc6ebde9b4a3349fe90e9 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 20 Oct 2023 12:24:24 +0300 Subject: [PATCH] CI: use DetSys Nix Installer action --- .github/workflows/cachix.yml | 10 +++------- .github/workflows/check-docs.yml | 15 ++++----------- .github/workflows/check.yml | 29 ++++++++++++++++------------- .github/workflows/manual.yml | 3 ++- 4 files changed, 25 insertions(+), 32 deletions(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index a6f89a5..a38db3b 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -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: diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index 40e5c8b..01c91dd 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -26,13 +26,9 @@ 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 @@ -40,10 +36,7 @@ jobs: - 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 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8c2b586..8101b8b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 . diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index b71ffa6..7463585 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -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: |