on master help sign in
wip
commita071ce6034bafc439c65c6eeca6038732dc2ffcb authoriko <ilyakooo0@gmail.com> dateWed 22 Dec 2021, 16:33 (5 years ago) parent2b3aee9
2 files changed+16−29
.github/actions/nix_cache/action.yaml+14−27 .github/actions/nix_cache_post/action.yaml+2−2
.github/actions/nix_cache/action.yaml+14−27
@@ -18,20 +18,6 @@ runs:
1818 # system-features = kvm
1919 # trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
2020 # substituters = https://hydra.iohk.io https://cache.nixos.org/
21− - name: make nix store writable
22− shell: bash
23− run: |
24− sudo mkdir /nix
25− sudo chown -R $USER /nix
26− # sudo rm -rf /nix/*
27− - name: Cache Nix
28− id: cache-nix
29− uses: actions/cache@v2.1.7
30− with:
31− path: |
32− /nix
33− key: ${{ inputs.key }}
34− restore-keys: ${{ inputs.restore-keys }}
3521 - name: Install Nix
3622 uses: cachix/install-nix-action@v16
3723 with:
@@ -39,16 +25,17 @@ runs:
3925 system-features = kvm
4026 trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
4127 substituters = https://hydra.iohk.io https://cache.nixos.org/
42− # - name: Move nix store
43− # shell: bash
44− # run: |
45− # echo
46− # ls /nix/store
47− # if [[ -d "~/nix/store/" ]]; then
48− # echo
49− # ls ~/nix/store
50− # sudo mkdir -p /nix/store
51− # sudo mv -f ~/nix/store/* /nix/store/
52− # fi
53− # echo
54− # ls /nix/store
28+ - name: Cache Nix
29+ id: cache-nix
30+ uses: actions/cache@v2.1.7
31+ with:
32+ path: |
33+ ~/nix
34+ key: ${{ inputs.key }}
35+ restore-keys: ${{ inputs.restore-keys }}
36+ - name: make nix store writable
37+ shell: bash
38+ run: |
39+ if [[ -d ~/nix ]]; then
40+ sudo mv -f ~/nix/* /nix/*
41+ fi
.github/actions/nix_cache_post/action.yaml+2−2
@@ -6,5 +6,5 @@ runs:
66 - name: Move nix store
77 shell: bash
88 run: |
9− mkdir -p ~/nix/store
10− sudo mv -f /nix/store/* ~/nix/store/
9+ mkdir -p ~/nix/
10+ sudo mv -f /nix/* ~/nix/