1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-07 06:55:42 +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 - 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: |

View File

@ -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 }}