1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-06 14:35:36 +02:00

Use a true/false key in the build cache

Reduce the number of caches to only two.
This commit is contained in:
Jonathan Daniel
2024-07-23 21:07:10 +03:00
parent 10e2159d5c
commit 8bebcec91c
2 changed files with 10 additions and 2 deletions

View File

@ -132,6 +132,8 @@ jobs:
- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache
with:
key: ${{ contains(fromJSON(env.LINK_CHECKED_LANGUAGES), matrix.language) }}
- name: Install Gettext
run: |

View File

@ -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:
@ -11,5 +17,5 @@ runs:
# Only save the cache on the main branch to avoid PRs filling
# up the cache.
save-if: ${{ github.ref == 'refs/heads/main' }}
# Further, save the cache per language.
key: ${{ matrix.language }}
# Further, save the cache per key - e.g. language grouping.
key: ${{ inputs.key }}