You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# collect garbage until Nix store size (in bytes) is at most this number
86
86
# before trying to save a new cache
87
-
#1 GB = 1073741824 B
88
-
gc-max-store-size-linux: 1073741824
87
+
#1G = 1073741824
88
+
gc-max-store-size-linux: 1G
89
89
# do purge caches
90
90
purge: true
91
91
# purge all versions of the cache
@@ -134,7 +134,7 @@ See [action.yml](action.yml).
134
134
| `paths-macos` | <ul> <li>Overrides <code>paths</code>.</li> <li>Can have an effect only when the action runs on a <code>macOS</code> runner.</li> </ul> | `false` | `""` |
135
135
| `paths-linux` | <ul> <li>Overrides <code>paths</code>.</li> <li>Can have an effect only when the action runs on a <code>Linux</code> runner.</li> </ul> | `false` | `""` |
136
136
| `backend` | <p>Choose an implementation of the <code>cache</code> package.</p> <ul> <li>When <code>actions</code>, use the <a href="https://github.com/actions/toolkit/tree/main/packages/cache">actions version</a> from <a href="https://github.com/nix-community/cache-nix-action/tree/actions-toolkit/packages/cache">here</a>.</li> <li>When <code>buildjet</code>, use the <a href="https://github.com/BuildJet/toolkit/tree/main/packages/cache-buildjet">BuildJet version</a> from <a href="https://github.com/nix-community/cache-nix-action/tree/buildjet-toolkit/packages/cache">here</a>.</li> </ul> | `false` | `actions` |
137
-
| `gc-max-store-size` | <ul> <li>Can have an effect only when <code>nix: true</code>, <code>save: true</code>.</li> <li>The input has no effect if "primary-key" hit occurs when starting to save the new cache.</li> <li>When a number, the action collects garbage (via <code>nix store gc --max ...</code>) until the Nix store size (in bytes) is at most this number just before the action tries to save a new cache.</li> <li>Otherwise, this input has no effect.</li> </ul> | `false` | `""` |
137
+
| `gc-max-store-size` | <ul> <li>Can have an effect only when <code>nix: true</code>, <code>save: true</code>.</li> <li>The input has no effect if "primary-key" hit occurs when starting to save the new cache.</li> <li>When a non-negative integer number (possibly with a suffix), the action collects garbage (via <code>nix store gc --max ...</code>) until the Nix store size (in bytes) is at most this number just before the action tries to save a new cache.</li> <li>If you specify a suffix, it must be <code>K</code> (kibibytes, 2 ^ 10 bytes), <code>M</code> (mebibytes, 2 ^ 20 bytes) or <code>G</code> (gibibytes, 2 ^ 30 bytes), where <code>2 ^ N</code> means <code>2 to the power N</code>.</li> <li>Otherwise, this input has no effect.</li> </ul> | `false` | `""` |
138
138
| `gc-max-store-size-macos` | <ul> <li>Overrides <code>gc-max-store-size</code>.</li> <li>Can have an effect only when the action runs on a <code>macOS</code> runner.</li> </ul> | `false` | `""` |
139
139
| `gc-max-store-size-linux` | <ul> <li>Overrides <code>gc-max-store-size</code>.</li> <li>Can have an effect only when the action runs on a <code>Linux</code> runner.</li> </ul> | `false` | `""` |
140
140
| `purge` | <ul> <li>When <code>true</code>, the action purges (possibly zero) caches.</li> <li>The action purges only caches scoped to the current <a href="https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables">GITHUB_REF</a>.</li> <li>Otherwise, this input has no effect.</li> </ul> | `false` | `false` |
Copy file name to clipboardExpand all lines: action.nix
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,8 @@ in
163
163
]
164
164
}
165
165
- The input has no effect if "${primary-key}" hit occurs when starting to save the new cache.
166
-
- When a non-negative number, the action collects garbage (via `nix store gc --max ...`) until the Nix store size (in bytes) is at most this number just before the action tries to save a new cache.
166
+
- When a non-negative integer number (possibly with a suffix), the action collects garbage (via `nix store gc --max ...`) until the Nix store size (in bytes) is at most this number just before the action tries to save a new cache.
167
+
- If you specify a suffix, it must be `K` (kibibytes, 2 ^ 10 bytes), `M` (mebibytes, 2 ^ 20 bytes) or `G` (gibibytes, 2 ^ 30 bytes), where `2 ^ N` means `2 to the power N`.
Copy file name to clipboardExpand all lines: action.yml
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,8 @@ inputs:
88
88
description: |
89
89
- Can have an effect only when `nix: true`, `save: true`.
90
90
- The input has no effect if "primary-key" hit occurs when starting to save the new cache.
91
-
- When a number, the action collects garbage (via `nix store gc --max ...`) until the Nix store size (in bytes) is at most this number just before the action tries to save a new cache.
91
+
- When a non-negative integer number (possibly with a suffix), the action collects garbage (via `nix store gc --max ...`) until the Nix store size (in bytes) is at most this number just before the action tries to save a new cache.
92
+
- If you specify a suffix, it must be `K` (kibibytes, 2 ^ 10 bytes), `M` (mebibytes, 2 ^ 20 bytes) or `G` (gibibytes, 2 ^ 30 bytes), where `2 ^ N` means `2 to the power N`.
0 commit comments