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 GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| action | What to do (store or load). | yes | — |
| storage-host | Storage 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-dir | 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 | no | — |
| storage-max-age-sec | 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). | no | — |
| storage-keep-hint-slots | 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. | no | — |
| slot-id | 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"). | no | — |
| local-dir | Local 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 | — |
| hint | Optional 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 | — |
| exclude | Newline separated exclude pattern(s) for rsync. Default: empty. | no | — |
| layer-name | If 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-include | Newline-separated include pattern(s) for rsync. If set, only the files matching the patterns will be transferred. Implies setting layer-name. Default: empty. | no | — |
| sudo | If 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-before | If set, runs the specified bash command before storing/loading. Default: empty. | no | — |
| verbose | If set, prints the list of transferred files. Default: false. | no | — |
Outputs
no outputs