-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation regarding dependencies caching #417
Changes from 2 commits
8018234
f90673a
317c661
d45ebba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,7 +159,7 @@ The `cache` input is optional, and caching is turned on by default. | |
|
||
The action defaults to search for the dependency file - go.sum in the repository root, and uses its hash as a part of | ||
the cache key. Use `cache-dependency-path` input for cases when multiple dependency files are used, or they are located | ||
in different subdirectories. | ||
in different subdirectories. Wildcards also supported. | ||
|
||
If some problem that prevents success caching happens then the action issues the warning in the log and continues the execution of the pipeline. | ||
|
||
|
@@ -172,7 +172,11 @@ steps: | |
with: | ||
go-version: '1.17' | ||
check-latest: true | ||
cache-dependency-path: subdir/go.sum | ||
cache-dependency-path: | | ||
subdir/go.sum | ||
tools/go.sum | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this syntax is pretty unclear. Is this parameter accepting space-separated strings? Or an array? Something like this would be more idiomatic yaml:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yurishkuro This format inherited from cache action as I understood: https://github.com/actions/cache#using-a-combination-of-restore-and-save-actions So I think it make sense to open an issue there. |
||
# cache-dependency-path: "**/*.sum" | ||
|
||
- run: go run hello.go | ||
``` | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To precise this syntax is not "wildcards" but rather "glob pattern" (https://en.wikipedia.org/wiki/Glob_(programming)). The difference is significant because the latter much more powerful and calling it "wildcards" could be misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.