dedupe nix cache

This commit is contained in:
Ari Lotter 2026-04-20 16:52:57 -04:00
parent 5395df1b6c
commit 1d2615b602
4 changed files with 11 additions and 4 deletions

8
.github/actions/nix-setup/action.yml vendored Normal file
View file

@ -0,0 +1,8 @@
name: 'Setup Nix'
description: 'Install Nix with DeterminateSystems and enable magic-nix-cache'
runs:
using: composite
steps:
- uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13

View file

@ -19,7 +19,7 @@ jobs:
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: nixbuild/nix-quick-install-action@63ca48f939ee3b8d835f4126562537df0fee5b91 # v30 - uses: ./.github/actions/nix-setup
- name: Resolve head SHA - name: Resolve head SHA
id: sha id: sha

View file

@ -98,7 +98,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 fetch-depth: 0
- uses: nixbuild/nix-quick-install-action@63ca48f939ee3b8d835f4126562537df0fee5b91 # v30 - uses: ./.github/actions/nix-setup
- name: Apply lockfile hashes - name: Apply lockfile hashes
id: apply id: apply

View file

@ -21,8 +21,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22 - uses: ./.github/actions/nix-setup
- uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
- name: Check flake - name: Check flake
if: runner.os == 'Linux' if: runner.os == 'Linux'
run: nix flake check --print-build-logs run: nix flake check --print-build-logs