dimikot/CI Storage

Quickly stores huge work directory with low percentage of changed files on a remote host, or loads it from that host.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
actionWhat to do (store or load).yes
storage-hostStorage host in the format [user@]host[:port]; it must allow password-free SSH key based access. Default: the content of ~/ci-storage-host file.no
storage-dirStorage 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: /mntno
storage-max-age-secRemove 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).no
storage-keep-hint-slotsDefines 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.no
slot-idId 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").no
local-dirLocal directory path to store from or load to. The value namespaces the data stored, so different local-dir values correspond to different storages. If the owner of the directory is different from the current user, then ci-storage tool is run with sudo, and the binary is used not from the action directory, but from /usr/bin/ci-storage. Default: "." (current work directory).no
hintOptional hints of the CI run to let slot-id="*" specifier find the best slot in the storage to load from. The leftmost matching hints have higher priority. If a line in multi-line hint starts with "@", then it expands to a digest of the content of all files matching the space-separated list of patterns on the same line after the "@". On "store" action, if --hint is not provided, the hints are derived from the previous "load" action. Default: empty.no
excludeNewline separated exclude pattern(s) for rsync. Default: empty.no
layer-nameIf set, the final directory on the storage host will be {storage-dir}/{owner}/{repo}/{slug(local-dir)}.{layer-name}, plus deletion will be turned off on load. Default: empty.no
layer-includeNewline-separated include pattern(s) for rsync. If set, only the files matching the patterns will be transferred. Implies setting layer-name. Default: empty.no
sudoIf set, uses /usr/bin/ci-storage path and runs it with sudo. Useful for storing/loading privileged directories like Docker volumes. Default: false.no
run-beforeIf set, runs the specified bash command before storing/loading. Default: empty.no
verboseIf set, prints the list of transferred files. Default: false.no

no outputs