-
-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
24 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
name: Nix Installer | ||
description: Nix Installer | ||
outputs: | ||
cache-hit: | ||
description: "Indicate if cache is hit" | ||
value: ${{ steps.nix-cache.outputs.cache-hit }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@3ebd1aebb47f95493b62de6eec0cac3cd74e50a9 | ||
- name: Set Permission | ||
run: | | ||
# Create with liberal rights, otherwise cache action will complain | ||
# about permission errors. | ||
sudo mkdir -p /nix/store | ||
sudo chmod -R 777 /nix | ||
- name: Cache Nix Store | ||
- name: Cache nix env take N+1 | ||
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 | ||
id: nix-cache | ||
with: | ||
path: /tmp/nixcache | ||
key: cache-nix-${{ github.workflow }}-${{ github.job }}-${{ hashFiles('**/flake.lock') }} | ||
path: | | ||
# See https://github.com/actions/cache/pull/726 | ||
/nix/store/** | ||
# Missing something? | ||
/nix/var/nix/*/* | ||
/nix/var/nix/db/* | ||
/nix/var/nix/db/*/** | ||
!/nix/var/nix/daemon-socket/socket | ||
!/nix/var/nix/userpool/* | ||
!/nix/var/nix/gc.lock | ||
!/nix/var/nix/db/big-lock | ||
!/nix/var/nix/db/reserved | ||
key: cache-nix-${{ hashFiles('**/flake.lock') }} | ||
|
||
- name: Restore Nix Cache | ||
shell: bash | ||
if: steps.nix-cache.outputs.cache-hit == 'true' | ||
run: nix copy --from /tmp/nixcache | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@3ebd1aebb47f95493b62de6eec0cac3cd74e50a9 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters