rust-cache/action.yml

42 lines
1.4 KiB
YAML
Raw Normal View History

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:
prefix-key:
description: "The prefix cache key, this can be changed to start a new cache manually"
required: false
default: "v0-rust"
2022-07-16 18:38:38 +08:00
shared-key:
description: "An additional cache key that is stable over multiple jobs"
required: false
2020-09-25 22:42:39 +08:00
key:
2020-10-04 00:39:38 +08:00
description: "An additional key for the cache"
2020-09-25 22:42:39 +08:00
required: false
2022-07-16 18:38:38 +08:00
env-vars:
description: "Additional environment variables to include in the cache key, separated by spaces"
required: false
2022-07-09 21:19:29 +08:00
workspaces:
description: "Paths to multiple Cargo workspaces and their target directories, separated by newlines"
required: false
cache-directories:
description: "Additional non workspace directories, separated by newlines"
required: false
cache-targets:
description: "Determines whether workspace targets are cached"
required: false
default: "true"
2021-06-29 05:18:07 +08:00
cache-on-failure:
description: "Cache even if the build fails. Defaults to false"
required: false
2020-12-22 10:56:41 +08:00
outputs:
cache-hit:
2021-05-19 16:10:43 +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"