From 2deb4358e04281741770ee19ad939d358fb3798e Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Wed, 28 Jun 2023 14:08:52 -0700 Subject: [PATCH 1/2] Provide docs for upstream cache --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd0d8d7..caab426 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,20 @@ The caching daemon and Nix both handle this gracefully, and won't cause your CI When the rate limit is exceeded while pulling dependencies, your workflow may perform more builds than usual. When the rate limit is exceeded while uploading to the cache, the remainder of those store paths will be uploaded on the next run of the workflow. +## Concepts -# Action Options +### Upstream cache + +When you configure an upstream cache for the Magic Nix Cache, any store paths fetched from that source are *not* cached because they are known to be fetchable on future workflow runs. +The default is `https://cache.nixos.org` but you can set a different upstream: + +```yaml +- uses: DeterminateSystems/magic-nix-cache-action@main + with: + upstream-cache: my-binary-cache.com +``` + +## Action Options @@ -83,8 +95,9 @@ cat action.yml| nix run nixpkgs#yq-go -- '[[ "Parameter", "Description", "Requir | `source-revision` | The revision of `nix-magic-nix-cache` to use. Conflicts with all other `source-*` options. | | | | `source-tag` | The tag of `magic-nix-cache` to use. Conflicts with all other `source-*` options. | | | | `source-url` | A URL pointing to a `magic-nix-cache` binary. Overrides all other `source-*` options. | | | -| `upstream-cache` | Your preferred upstream cache. Store paths in this store will not be cached in GitHub Actions' cache. | | https://cache.nixos.org | +| `upstream-cache` | Your preferred [upstream cache](#upstream-cache). Store paths fetched from this store will not be cached in the [GitHub Actions Cache][gha-cache]. | | https://cache.nixos.org | +[gha-cache]: https://docs.github.com/en/rest/actions/cache [detsys]: https://determinate.systems/ [action]: https://github.com/DeterminateSystems/magic-nix-cache-action/ [installer]: https://github.com/DeterminateSystems/nix-installer/ From b024e62f405474fc90841eb629c0853f6ca84dc1 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Wed, 28 Jun 2023 14:11:59 -0700 Subject: [PATCH 2/2] Update example address --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index caab426..24aa9a2 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ The default is `https://cache.nixos.org` but you can set a different upstream: ```yaml - uses: DeterminateSystems/magic-nix-cache-action@main with: - upstream-cache: my-binary-cache.com + upstream-cache: https://my-binary-cache.com ``` ## Action Options