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
Copy file name to clipboardExpand all lines: action.yml
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,10 @@ inputs:
14
14
description: "Storage directory on the remote host. Notice that, when building the final directory on the storage host, owner and repo are always appended, so the path will be {storage-dir}/{owner}/{repo}/{slug(local-dir)} or {storage-dir}/{owner}/{repo}/{slug(local-dir)}.{layer-name}. Default: /mnt"
15
15
required: false
16
16
storage-max-age-sec:
17
-
description: "Remove slots created earlier than this many seconds ago. Default: 14400 (4 hours)."
17
+
description: "Remove slots created earlier than this many seconds ago. The exception is the newest slot (it's always kept), and also up to --storage-keep-hint-slots slots related to unique hints. Default: 3600 (1 hour)."
18
+
required: false
19
+
storage-keep-hint-slots:
20
+
description: "Defines the number of unique hints, for which ci-storage will keep at least one newest slot, even if is past --storage-max-age-sec. Default: 5."
18
21
required: false
19
22
slot-id:
20
23
description: 'Id of the slot to store to or load from; use "*" to load a smart-random slot (e.g. most recent or best in terms of layer compatibility) and skip if it does not exist. Default: $GITHUB_RUN_ID (which is friendly to "Re-run failed jobs").'
Copy file name to clipboardExpand all lines: ci-storage
+45-8Lines changed: 45 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ import typing
17
17
18
18
STORAGE_MAX_AGE_SEC_DEFAULT=3600
19
19
STORAGE_MAX_AGE_SEC_BAK=60
20
+
STORAGE_KEEP_HINT_SLOTS_DEFAULT=5
20
21
STORAGE_DIR_DEFAULT="~/ci-storage"
21
22
META_FILE=".ci-storage.meta"
22
23
EMPTY_DIR=".ci-storage.empty-dir"
@@ -76,7 +77,14 @@ def main():
76
77
type=str,
77
78
default=str(STORAGE_MAX_AGE_SEC_DEFAULT),
78
79
required=False,
79
-
help="Remove slots created earlier than this many seconds ago.",
80
+
help="Remove slots created earlier than this many seconds ago. The exception is the newest slot (it's always kept), and also up to --storage-keep-hint-slots slots related to unique hints.",
81
+
)
82
+
parser.add_argument(
83
+
"--storage-keep-hint-slots",
84
+
type=str,
85
+
default=str(STORAGE_KEEP_HINT_SLOTS_DEFAULT),
86
+
required=False,
87
+
help="Defines the number of unique hints, for which ci-storage will keep at least one newest slot, even if is past --storage-max-age-sec.",
0 commit comments