Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions discover/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
13 changes: 1 addition & 12 deletions run/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down