Skip to content

Commit e78327d

Browse files
committed
small code style improvements, README and CHANGELOG updates
1 parent ccdddcc commit e78327d

File tree

7 files changed

+4582
-4561
lines changed

7 files changed

+4582
-4561
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Changelog
22

3+
## 2.1.0
4+
5+
- Only hash `Cargo.{lock,toml}` files in the configured workspace directories.
6+
37
## 2.0.2
48

59
- Avoid calling `cargo metadata` on pre-cleanup.
10+
- Added `prefix-key`, `cache-directories` and `cache-targets` options.
611

712
## 2.0.1
813

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ sensible defaults.
1414

1515
- uses: Swatinem/rust-cache@v2
1616
with:
17-
# The prefix cache key, this can be changed to start a new cache manually
17+
# The prefix cache key, this can be changed to start a new cache manually.
1818
# default: "v0-rust"
1919
prefix-key: ""
2020

21-
# An additional cache key that is stable over multiple jobs
21+
# A cache key that is used instead of the automatic `job`-based key,
22+
# and is stable over multiple jobs.
2223
# default: empty
2324
shared-key: ""
2425

@@ -41,10 +42,11 @@ sensible defaults.
4142
# default: ". -> target"
4243
workspaces: ""
4344

44-
# Additional non workspace directories, separated by newlines
45+
# Additional non workspace directories to be cached, separated by newlines.
4546
cache-directories: ""
4647

4748
# Determines whether workspace `target` directories are cached.
49+
# If `false`, only the cargo registry will be cached.
4850
# default: "true"
4951
cache-targets: ""
5052

action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@ description: "A GitHub Action that implements smart caching for rust/cargo proje
33
author: "Arpad Borsos <[email protected]>"
44
inputs:
55
prefix-key:
6-
description: "The prefix cache key, this can be changed to start a new cache manually"
6+
description: "The prefix cache key, this can be changed to start a new cache manually."
77
required: false
88
default: "v0-rust"
99
shared-key:
10-
description: "An additional cache key that is stable over multiple jobs"
10+
description: "A cache key that is used instead of the automatic `job`-based key, and is stable over multiple jobs."
1111
required: false
1212
key:
13-
description: "An additional key for the cache"
13+
description: "An additional cache key that is added alongside the automatic `job`-based cache key and can be used to further differentiate jobs."
1414
required: false
1515
env-vars:
16-
description: "Additional environment variables to include in the cache key, separated by spaces"
16+
description: "Additional environment variables to include in the cache key, separated by spaces."
1717
required: false
1818
workspaces:
19-
description: "Paths to multiple Cargo workspaces and their target directories, separated by newlines"
19+
description: "Paths to multiple Cargo workspaces and their target directories, separated by newlines."
2020
required: false
2121
cache-directories:
22-
description: "Additional non workspace directories, separated by newlines"
22+
description: "Additional non workspace directories to be cached, separated by newlines."
2323
required: false
2424
cache-targets:
25-
description: "Determines whether workspace targets are cached"
25+
description: "Determines whether workspace targets are cached. If `false`, only the cargo registry will be cached."
2626
required: false
2727
default: "true"
2828
cache-on-failure:
29-
description: "Cache even if the build fails. Defaults to false"
29+
description: "Cache even if the build fails. Defaults to false."
3030
required: false
3131
outputs:
3232
cache-hit:
33-
description: "A boolean value that indicates an exact match was found"
33+
description: "A boolean value that indicates an exact match was found."
3434
runs:
3535
using: "node16"
3636
main: "dist/restore/index.js"

0 commit comments

Comments
 (0)