-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathaction.yml
More file actions
124 lines (114 loc) · 5.96 KB
/
Copy pathaction.yml
File metadata and controls
124 lines (114 loc) · 5.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: "Save Nix Store"
description: "Save Nix store using GitHub Actions cache to speed up workflows."
author: "GitHub"
inputs:
primary-key:
description: |
- When a non-empty string, the action uses this key for saving a cache.
- Otherwise, the action fails.
required: true
nix:
description: |
- Can have an effect only when the action runs on a `Linux` or a `macOS` runner.
- When `true`, the action can do Nix-specific things.
- Otherwise, the action doesn't do them.
default: "true"
save:
description: |
- When `true`, the action can save a cache with the `primary-key`.
- Otherwise, the action can't save a cache.
default: "true"
paths:
description: |
- When `nix: true`, the action uses `["/nix"]` as default paths.
- Otherwise, the action uses an empty list as default paths.
- When a newline-separated non-empty list of non-empty path patterns (see [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns), the action appends it to default paths and uses the resulting list for saving caches.
- Otherwise, the action uses default paths for saving caches.
default: ""
paths-macos:
description: |
- Overrides `paths`.
- Can have an effect only when the action runs on a `macOS` runner.
default: ""
paths-linux:
description: |
- Overrides `paths`.
- Can have an effect only when the action runs on a `Linux` runner.
default: ""
backend:
description: |
Choose an implementation of the `cache` package.
- When `actions`, use the [actions version](https://github.com/actions/toolkit/tree/main/packages/cache) from [here](https://github.com/nix-community/cache-nix-action/tree/actions-toolkit/packages/cache).
- When `buildjet`, use the [BuildJet version](https://github.com/BuildJet/toolkit/tree/main/packages/cache-buildjet) from [here](https://github.com/nix-community/cache-nix-action/tree/buildjet-toolkit/packages/cache).
default: "actions"
required: false
gc-max-store-size:
description: |
- Can have an effect only when `nix: true`, `save: true`.
- The input has no effect if "primary-key" hit occurs when starting to save the new cache.
- 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.
- 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`.
Examples: `5G` (same as `5368709120`), `20M` (same as `20971520`).
- Otherwise, this input has no effect.
default: ""
gc-max-store-size-macos:
description: |
- Overrides `gc-max-store-size`.
- Can have an effect only when the action runs on a `macOS` runner.
default: ""
gc-max-store-size-linux:
description: |
- Overrides `gc-max-store-size`.
- Can have an effect only when the action runs on a `Linux` runner.
default: ""
purge:
description: |
- When `true`, the action purges (possibly zero) caches.
- The action purges only caches scoped to the current [GITHUB_REF](https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables).
- Otherwise, this input has no effect.
default: "false"
purge-primary-key:
description: |
- Can have an effect only when `purge: true`.
- When `always`, the action always purges the cache with the `primary-key`.
- When `never`, the action never purges the cache with the `primary-key`.
- Otherwise, this input has no effect.
default: ""
purge-prefixes:
description: |
- Can have an effect only when `purge: true`.
- When a newline-separated non-empty list of non-empty cache key prefixes, the action selects for purging all caches whose keys match some of these prefixes.
- Otherwise, this input has no effect.
default: ""
purge-last-accessed:
description: |
- Can have an effect only when `purge: true`.
- When a non-negative number or a string in the [ISO 8601 duration format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration#iso_8601_duration_format),
the action purges selected caches that were last accessed more than this number of seconds or this duration before the start of the Save step. Examples: `0` (0 seconds), `P1DT12H` (1 day and 12 hours).
- Otherwise, this input has no effect.
default: ""
purge-created:
description: |
- Can have an effect only when `purge: true`.
- When a non-negative number or a string in the [ISO 8601 duration format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration#iso_8601_duration_format),
the action purges selected caches that were created more than this number of seconds or this duration before the start of the Save step. Examples: `0` (0 seconds), `P1DT12H` (1 day and 12 hours).
- Otherwise, this input has no effect.
default: ""
upload-chunk-size:
# The original default value may be provided here (https://github.com/actions/cache/issues/1292)
# 32MB
description: |
- When a non-negative number, the action uses it as the chunk size (in bytes) to split up large files during upload.
- Otherwise, the action uses the default value `33554432` (32MB).
default: ""
token:
description: |
- The action uses it to communicate with GitHub API.
- If you use a personal access token, it must have the `repo` scope ([link](https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-github-actions-caches-for-a-repository-using-a-cache-key)).
default: ${{ github.token }}
runs:
using: "node24"
main: "../dist/save-only/index.js"
branding:
icon: "archive"
color: "gray-dark"