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

Add documentation for output cache-hit #148

Merged
merged 1 commit into from
Feb 7, 2024
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,22 @@ You can optionally define a custom cache key prefix.

```yaml
- name: Enable caching and define a custom cache key prefix
id: setup-rye
uses: eifinger/setup-rye@v1
with:
enable-cache: true
cache-prefix: 'optional-prefix'
```

When the cache was successfully restored the output `cache-hit` will be set to `true` and you can use it in subsequent steps.
For the example above you can use it like this:

```yaml
- name: Do something if the cache was restored
if: steps.setup-rye.outputs.cache-hit == 'true'
run: echo "Cache was restored"
```

#### Working directory

If your rye project is not at the root of the repository you can specify the working directory
Expand Down
Loading