From c5f5edb9c8f73cf3f564f2b5b628947fd1d74116 Mon Sep 17 00:00:00 2001 From: Phillipp Schoppmann Date: Tue, 4 Nov 2025 10:00:08 -0800 Subject: [PATCH] Improve caching for presubmit workflows PiperOrigin-RevId: 828020443 --- .github/workflows/presubmit.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index f6b6ff2..059a0ec 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -37,9 +37,11 @@ jobs: with: path: | ~/.cache/bazel - key: ${{ runner.os }}-${{ hashFiles('.bazelrc', 'MODULE.bazel') }} + key: ${{ runner.os }}-${{ hashFiles('.bazelrc') }}-${{ hashFiles('MODULE.bazel.lock') }}-${{ github.sha }} restore-keys: | - ${{ runner.os }}-${{ hashFiles('.bazelrc', 'MODULE.bazel') }} + ${{ runner.os }}-${{ hashFiles('.bazelrc') }}-${{ hashFiles('MODULE.bazel.lock') }}- + ${{ runner.os }}-${{ hashFiles('.bazelrc') }}- + ${{ runner.os }}- - name: "Run `bazel build`" run: |