diff --git a/.github/actions/nix-setup/action.yml b/.github/actions/nix-setup/action.yml index 0fcd7784bc..0aeaf918cc 100644 --- a/.github/actions/nix-setup/action.yml +++ b/.github/actions/nix-setup/action.yml @@ -1,8 +1,18 @@ name: 'Setup Nix' -description: 'Install Nix with DeterminateSystems and enable magic-nix-cache' +description: 'Install Nix and configure Cachix binary cache' + +inputs: + cachix-auth-token: + description: 'Cachix auth token (enables push). Omit for read-only.' + required: false + default: '' runs: using: composite steps: - uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22 - - uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13 + - uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17 + with: + name: hermes-agent + authToken: ${{ inputs.cachix-auth-token }} + continue-on-error: true diff --git a/.github/workflows/nix-lockfile-check.yml b/.github/workflows/nix-lockfile-check.yml index 6326f45f9a..da82826ce9 100644 --- a/.github/workflows/nix-lockfile-check.yml +++ b/.github/workflows/nix-lockfile-check.yml @@ -20,6 +20,8 @@ jobs: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: ./.github/actions/nix-setup + with: + cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Resolve head SHA id: sha diff --git a/.github/workflows/nix-lockfile-fix.yml b/.github/workflows/nix-lockfile-fix.yml index 5238660d04..2682f8b504 100644 --- a/.github/workflows/nix-lockfile-fix.yml +++ b/.github/workflows/nix-lockfile-fix.yml @@ -62,6 +62,8 @@ jobs: token: ${{ steps.app-token.outputs.token }} - uses: ./.github/actions/nix-setup + with: + cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Apply lockfile hashes id: apply @@ -200,6 +202,8 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/nix-setup + with: + cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Apply lockfile hashes id: apply diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 7cae6f8151..f0d5bf719e 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -22,6 +22,8 @@ jobs: steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: ./.github/actions/nix-setup + with: + cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Check flake if: runner.os == 'Linux' run: nix flake check --print-build-logs