Skip to content

feat: add cache-targets input propagated to Swatinem/rust-cache - #96

Merged
jonasbb merged 1 commit into
actions-rust-lang:mainfrom
somaz94:feat/cache-targets
Jun 25, 2026
Merged

feat: add cache-targets input propagated to Swatinem/rust-cache#96
jonasbb merged 1 commit into
actions-rust-lang:mainfrom
somaz94:feat/cache-targets

Conversation

@somaz94

@somaz94 somaz94 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Adds a cache-targets input that is forwarded to Swatinem/rust-cache as cache-targets, mirroring the existing cache-all-crates / cache-workspace-crates / cache-save-if passthroughs.

This lets you skip caching the workspace target directory (e.g. when using sccache) without disabling rust-cache entirely. The default is true, identical to rust-cache's own default, so behavior is unchanged when the input is left unset.

Resolves #84.

Validation:

  • pre-commit run --files action.yml README.md CHANGELOG.md passes locally, including Validate GitHub Actions (action.yml schema) and check-yaml.
  • Default value true matches Swatinem/rust-cache's default, so the rendered cache step is unchanged unless the input is explicitly set.

@somaz94
somaz94 marked this pull request as ready for review June 24, 2026 06:21
@jonasbb

jonasbb commented Jun 25, 2026

Copy link
Copy Markdown
Member

Thanks, the code looks all good. I will merge this and tag a new version

@jonasbb
jonasbb merged commit 29eefe9 into actions-rust-lang:main Jun 25, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add support for cache-targets option of rust-cache

2 participants