|
18 | 18 | key: ${{ runner.os }}-build-${{ hashFiles('app/build.gradle') }} |
19 | 19 | - uses: actions/checkout@v4 |
20 | 20 | - uses: DeterminateSystems/nix-installer-action@v16 |
| 21 | + - uses: nix-community/cache-nix-action@v6 |
| 22 | + with: |
| 23 | + # restore and save a cache using this key |
| 24 | + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.yaml') }} |
| 25 | + # if there's no cache hit, restore a cache by this prefix |
| 26 | + restore-prefixes-first-match: nix-${{ runner.os }}- |
| 27 | + # collect garbage until the Nix store size (in bytes) is at most this number |
| 28 | + # before trying to save a new cache |
| 29 | + # 1G = 1073741824 |
| 30 | + gc-max-store-size-linux: 1.5G |
| 31 | + # do purge caches |
| 32 | + purge: true |
| 33 | + # purge all versions of the cache |
| 34 | + purge-prefixes: nix-${{ runner.os }}- |
| 35 | + # created more than this number of seconds ago |
| 36 | + purge-created: 0 |
| 37 | + # or, last accessed more than this number of seconds ago |
| 38 | + # relative to the start of the `Post Restore and save Nix store` phase |
| 39 | + purge-last-accessed: 0 |
| 40 | + # except any version with the key that is the same as the `primary-key` |
| 41 | + purge-primary-key: never |
21 | 42 | - name: Install Trilium Server and ImageMagick |
22 | | - run: nix profile install nixpkgs/master#trilium-next-server nixpkgs/master#imagemagick |
| 43 | + run: nix profile install github:TriliumNext/Notes/c40e224727a8b00c864bc3f525ca9a6670d17254#server nixpkgs/master#imagemagick |
23 | 44 | - name: Run Trilium Server |
24 | 45 | run: ./app/test/setup-test-server.sh |
25 | 46 | - uses: actions/setup-java@v4 |
|
0 commit comments