You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-06 22:45:40 +02:00
Use a true/false key in the build cache
Reduce the number of caches to only two.
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -132,6 +132,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup Rust cache
|
- name: Setup Rust cache
|
||||||
uses: ./.github/workflows/setup-rust-cache
|
uses: ./.github/workflows/setup-rust-cache
|
||||||
|
with:
|
||||||
|
key: ${{ contains(fromJSON(env.LINK_CHECKED_LANGUAGES), matrix.language) }}
|
||||||
|
|
||||||
- name: Install Gettext
|
- name: Install Gettext
|
||||||
run: |
|
run: |
|
||||||
|
10
.github/workflows/setup-rust-cache/action.yml
vendored
10
.github/workflows/setup-rust-cache/action.yml
vendored
@ -2,6 +2,12 @@ name: Setup Rust cache
|
|||||||
|
|
||||||
description: Configure the rust-cache workflow.
|
description: Configure the rust-cache workflow.
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
key:
|
||||||
|
description: Additional caching key
|
||||||
|
required: false
|
||||||
|
default:
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@ -11,5 +17,5 @@ runs:
|
|||||||
# Only save the cache on the main branch to avoid PRs filling
|
# Only save the cache on the main branch to avoid PRs filling
|
||||||
# up the cache.
|
# up the cache.
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
# Further, save the cache per language.
|
# Further, save the cache per key - e.g. language grouping.
|
||||||
key: ${{ matrix.language }}
|
key: ${{ inputs.key }}
|
||||||
|
Reference in New Issue
Block a user