You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-05 06:00:30 +02:00
Set Rust caching key per language group (#2250)
Fixes #2247 (a follow-up from #2195).
* Add a workflow dispatch manual trigger to the tests workflow.
* Move the link-checked languages JSON list to the build job's env.
* Set a caching key per language group to avoid extra `mdbook-linkcheck`
installation on non-link-checked translations.
For the meaning of this key, see:
https://github.com/Swatinem/rust-cache?tab=readme-ov-file#example-usage
* Fix newly broken web link in 8a3ed21
✅
I tested it on my fork, and it looks good:
https://github.com/jond01/comprehensive-rust/actions/workflows/build.yml
https://github.com/jond01/comprehensive-rust/actions/caches
This commit is contained in:
13
.github/workflows/setup-rust-cache/action.yml
vendored
13
.github/workflows/setup-rust-cache/action.yml
vendored
@ -2,6 +2,12 @@ name: Setup Rust cache
|
||||
|
||||
description: Configure the rust-cache workflow.
|
||||
|
||||
inputs:
|
||||
key:
|
||||
description: Additional caching key
|
||||
required: false
|
||||
default:
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
@ -9,6 +15,7 @@ runs:
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
# Only save the cache on the main branch to avoid PRs filling
|
||||
# up the cache. Further, only save it if we are working on the
|
||||
# English source (or if no language has been set).
|
||||
save-if: ${{ github.ref == 'refs/heads/main' && (matrix.language == 'en' || matrix.language == '') }}
|
||||
# up the cache.
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
# Further, save the cache per key - e.g. language grouping.
|
||||
key: ${{ inputs.key }}
|
||||
|
Reference in New Issue
Block a user