Skip to content
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

Merged
merged 4 commits into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. The input supports glob patterns.

If some problem that prevents success caching happens then the action issues the warning in the log and continues the execution of the pipeline.

Expand All @@ -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

Choose a reason for hiding this comment

The 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:

      cache-dependency-path:
        - subdir/go.sum 
        - tools/go.sum

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
```

Expand Down