2020-09-25 22:42:39 +08:00
|
|
|
name: "Rust Cache"
|
2020-10-04 00:39:38 +08:00
|
|
|
description: "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults."
|
2022-07-09 21:19:29 +08:00
|
|
|
author: "Arpad Borsos <swatinem@swatinem.de>"
|
2020-09-25 22:42:39 +08:00
|
|
|
inputs:
|
2022-10-19 05:05:42 +08:00
|
|
|
prefix-key:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "The prefix cache key, this can be changed to start a new cache manually."
|
2022-10-19 05:05:42 +08:00
|
|
|
required: false
|
|
|
|
default: "v0-rust"
|
2022-07-16 18:38:38 +08:00
|
|
|
shared-key:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "A cache key that is used instead of the automatic `job`-based key, and is stable over multiple jobs."
|
2022-07-16 18:38:38 +08:00
|
|
|
required: false
|
2020-09-25 22:42:39 +08:00
|
|
|
key:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "An additional cache key that is added alongside the automatic `job`-based cache key and can be used to further differentiate jobs."
|
2020-09-25 22:42:39 +08:00
|
|
|
required: false
|
2022-07-16 18:38:38 +08:00
|
|
|
env-vars:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "Additional environment variables to include in the cache key, separated by spaces."
|
2021-10-07 10:35:31 +08:00
|
|
|
required: false
|
2022-07-09 21:19:29 +08:00
|
|
|
workspaces:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "Paths to multiple Cargo workspaces and their target directories, separated by newlines."
|
2021-07-17 04:58:46 +08:00
|
|
|
required: false
|
2022-10-19 05:05:42 +08:00
|
|
|
cache-directories:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "Additional non workspace directories to be cached, separated by newlines."
|
2022-10-19 05:05:42 +08:00
|
|
|
required: false
|
|
|
|
cache-targets:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "Determines whether workspace targets are cached. If `false`, only the cargo registry will be cached."
|
2022-10-19 05:05:42 +08:00
|
|
|
required: false
|
|
|
|
default: "true"
|
2021-06-29 05:18:07 +08:00
|
|
|
cache-on-failure:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "Cache even if the build fails. Defaults to false."
|
2021-06-29 05:18:07 +08:00
|
|
|
required: false
|
2023-05-12 05:15:09 +08:00
|
|
|
cache-all-crates:
|
|
|
|
description: "Determines which crates are cached. If `true` all crates will be cached, otherwise only dependent crates will be cached."
|
|
|
|
required: false
|
|
|
|
default: "false"
|
2022-11-07 02:15:00 +08:00
|
|
|
save-if:
|
|
|
|
description: "Determiners whether the cache should be saved. If `false`, the cache is only restored."
|
|
|
|
required: false
|
|
|
|
default: "true"
|
2020-12-22 10:56:41 +08:00
|
|
|
outputs:
|
|
|
|
cache-hit:
|
2022-11-06 16:37:23 +08:00
|
|
|
description: "A boolean value that indicates an exact match was found."
|
2020-09-25 22:42:39 +08:00
|
|
|
runs:
|
2022-07-09 21:19:29 +08:00
|
|
|
using: "node16"
|
2020-09-25 22:42:39 +08:00
|
|
|
main: "dist/restore/index.js"
|
|
|
|
post: "dist/save/index.js"
|
2021-06-29 05:18:07 +08:00
|
|
|
post-if: "success() || env.CACHE_ON_FAILURE == 'true'"
|
2020-09-25 22:42:39 +08:00
|
|
|
branding:
|
|
|
|
icon: "archive"
|
|
|
|
color: "gray-dark"
|