Skip to content

Commit c2a34d7

Browse files
authored
Cachix caching for nix-shell GitHub Action (#1081)
Squashed commit of the following: commit be261f9005d7f0382bd28e384542e141d47c4c35 Author: Peter Becich <[email protected]> Date: Wed Jun 1 20:17:02 2022 -0700 Revert "test" This reverts commit 678a1ed. commit 678a1ed Author: Peter Becich <[email protected]> Date: Wed Jun 1 19:47:10 2022 -0700 test commit 7c8b2ee Author: Peter Becich <[email protected]> Date: Wed May 25 18:55:42 2022 -0700 use Cachix in GitHub Action commit b99b637 Author: Peter Becich <[email protected]> Date: Tue May 24 00:17:53 2022 -0700 attempt to fix Github Actions caching commit 49f09ed Author: Peter Becich <[email protected]> Date: Mon May 23 19:40:27 2022 -0700 attempt to cache `/nix` in Nix Shell Github Action cachix/install-nix-action#56 (comment) commit 5a5b310 Author: Peter Becich <[email protected]> Date: Mon May 23 19:35:18 2022 -0700 attempt to use cache in Nix Shell Github Action https://github.com/cachix/install-nix-action#how-do-i-add-a-binary-cache
1 parent b21f35b commit c2a34d7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/nix-shell.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
# https://nix.dev/tutorials/continuous-integration-github-actions
21
name: "Test nix-shell"
32
on:
4-
push:
5-
branches:
6-
- '**'
7-
paths-ignore: []
8-
pull_request:
9-
paths-ignore: []
10-
3+
- push
4+
- pull_request
115
jobs:
126
nix-shell:
137
runs-on: ubuntu-latest
@@ -16,4 +10,12 @@ jobs:
1610
- uses: cachix/install-nix-action@v16
1711
with:
1812
nix_path: nixpkgs=channel:nixos-21.11
13+
extra_nix_config: |
14+
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
15+
substituters = https://hydra.iohk.io https://cache.nixos.org/
16+
- uses: cachix/cachix-action@v10
17+
with:
18+
# https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions
19+
name: hackage-server
20+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
1921
- run: nix-shell --pure --run "cabal update && cabal build all --enable-tests"

0 commit comments

Comments
 (0)