diff --git a/discover/action.yml b/discover/action.yml index 736b30f..282301c 100644 --- a/discover/action.yml +++ b/discover/action.yml @@ -18,6 +18,16 @@ outputs: runs: using: "composite" steps: + - name: Install Nix + uses: nixbuild/nix-quick-install-action@v21 + if: startsWith(runner.name, 'discovery') == false + with: + nix_conf: | + experimental-features = nix-command flakes + accept-flake-config = true + trusted-users = runner + access-tokens = github.com=${{ inputs.github_pat }} + - name: Cache Nix Store id: cache-nix if: startsWith(runner.name, 'discovery') == false @@ -32,17 +42,6 @@ runs: discovery-${{ runner.os }}-${{ runner.arch }}-${{ github.ref }}- discovery-${{ runner.os }}-${{ runner.arch }}- - - - name: Install Nix - uses: nixbuild/nix-quick-install-action@v21 - if: startsWith(runner.name, 'discovery') == false - with: - nix_conf: | - experimental-features = nix-command flakes - accept-flake-config = true - trusted-users = runner - access-tokens = github.com=${{ inputs.github_pat }} - - name: Discover id: eval env: diff --git a/run/action.yaml b/run/action.yaml index 9292a0d..795263a 100644 --- a/run/action.yaml +++ b/run/action.yaml @@ -74,17 +74,6 @@ runs: sudo chmod 0600 ~/.ssh/known_hosts shell: bash - - name: Restore Cache & Discovery Results - id: restore-cache - if: inputs.discovery_ssh == 'none' && runner.os != 'macOS' - uses: divnix/nix-cache-action@v3.0.11-nix - with: - path: | - /nix - ~/.cache/nix - ~root/.cache/nix - key: discovery-${{ runner.os }}-${{ runner.arch }}-${{ github.ref }}-${{ github.sha }} - - name: Install Nix uses: nixbuild/nix-quick-install-action@v21 with: @@ -98,7 +87,7 @@ runs: - name: Restore Cache & Discovery Results id: restore-cache-mac - if: inputs.discovery_ssh == 'none' && runner.os == 'macOS' + if: inputs.discovery_ssh == 'none' uses: divnix/nix-cache-action@v3.0.11-nix with: path: |