File tree 1 file changed +5
-2
lines changed
.github/actions/bootstrap
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 26
26
# because the bootstrapped Pigweed environment contains absolute paths.
27
27
echo "Calculating bootstrap cache key for '$PWD'"
28
28
FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}"
29
- OS_HASH="$(md5sum /etc/lsb-release | cut -d' ' -f1)"
30
- PYTHON_HASH="$(python --version | md5sum | cut -d' ' -f1)"
29
+ case "$RUNNER_OS" in
30
+ macOS) OS_HASH="$(sw_vers | shasum -a 256 | cut -d' ' -f1)";;
31
+ *) OS_HASH="$(shasum -a 256 /etc/lsb-release | cut -d' ' -f1)";;
32
+ esac
33
+ PYTHON_HASH="$(python --version | shasum -a 256 | cut -d' ' -f1)"
31
34
FINAL_HASH="$(echo "$PWD:$FILES_HASH:$OS_HASH:$PYTHON_HASH" | shasum -a 256 | cut -d' ' -f1)"
32
35
echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT"
33
36
You can’t perform that action at this time.
0 commit comments