Skip to content

Commit 4ec643c

Browse files
Fix the build cache key to incldue lsb-release (#34397)
* Fix the build cache key to incldue lsb-release * More hashing that is manual...I don't see hashFiles working --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com>
1 parent 99ea3e6 commit 4ec643c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/actions/bootstrap/action.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ runs:
2626
# because the bootstrapped Pigweed environment contains absolute paths.
2727
echo "Calculating bootstrap cache key for '$PWD'"
2828
FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}"
29-
FINAL_HASH="$(echo "$PWD:$FILES_HASH" | shasum -a 256 | cut -d' ' -f1)"
29+
OS_HASH="$(md5sum /etc/lsb-release | cut -d' ' -f1)"
30+
PYTHON_HASH="$(python --version | md5sum | cut -d' ' -f1)"
31+
FINAL_HASH="$(echo "$PWD:$FILES_HASH:$OS_HASH:$PYTHON_HASH" | shasum -a 256 | cut -d' ' -f1)"
3032
echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT"
3133
3234
# Split caches across backends

0 commit comments

Comments
 (0)