Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jul 17, 2023
1 parent a4d1aaa commit e2c2e68
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ A GitHub Action to cache Nix store paths using GitHub Actions cache.

This action is based on [actions/cache](https://github.com/actions/cache) and has all its inputs and outputs (see [Cache action](#cache-action)).

When there is a cache hit, restoring it is faster than downloading multiple paths from binary caches (see [ci.yaml](.github/workflows/ci.yaml) and related [Actions](https://github.com/deemp/cache-nix-too/actions/workflows/ci.yaml)).

## Other approaches

Discussed [here](https://github.com/DeterminateSystems/magic-nix-cache-action/issues/16) and [here](https://github.com/nixbuild/nix-quick-install-action/issues/33).

## Approach of this action

The [nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) action makes `/nix/store` owned by an unpriviliged user.
That's why, `actions/cache` can restore and save `/nix/`.
That's why, `actions/cache` can restore and save `/nix`.

When restoring, `actions/cache` writes cached Nix store paths into `/nix/store` of a runner.
Some of these paths may already be present in `/nix/store`, so reports about unarchivation errors are fine.
Expand All @@ -22,6 +24,8 @@ Some of these paths may already be present in `/nix/store`, so reports about una

This action inherits [inputs](#inputs) and [outputs](#outputs) of `actions/cache`.

These inputs are also described in [action.yml](action.yml).

### Modified/new inputs

This action caches `/nix`, `~/.cache/nix`, `~root/.cache/nix` paths by default as suggested [here](https://github.com/divnix/nix-cache-action/blob/b14ec98ae694c754f57f8619ea21b6ab44ccf6e7/action.yml#L7).
Expand Down Expand Up @@ -79,6 +83,7 @@ Discussed [here](https://github.com/deemp/cache-nix-too/issues/4).
This action allows caching dependencies and build outputs to improve workflow execution time.
>Two other actions are available in addition to the primary `cache` action:
>
>* [Restore action](./restore/README.md)
>* [Save action](./save/README.md)

Expand Down

0 comments on commit e2c2e68

Please sign in to comment.