Use shared macOS cache for runner bootstrap
This commit is contained in:
parent
52c3048458
commit
9a5f147585
1 changed files with 16 additions and 3 deletions
|
|
@ -602,14 +602,27 @@ if ! mkdir -p "/Users/runner/.cache/act" 2>/dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH}"
|
export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH}"
|
||||||
cache_root="${NSC_CACHE_PATH:-$HOME/.cache/burrow}"
|
cache_base="${NSC_CACHE_PATH:-$HOME/.cache/burrow}"
|
||||||
mkdir -p \
|
cache_root="${NSC_SHARED_CACHE_PATH:-${cache_base}/shared}"
|
||||||
|
cache_owner="$(id -un)"
|
||||||
|
cache_group="$(id -gn)"
|
||||||
|
if ! install -d -m 0775 -o "${cache_owner}" -g "${cache_group}" \
|
||||||
|
"${cache_root}" \
|
||||||
"${cache_root}/bin" \
|
"${cache_root}/bin" \
|
||||||
"${cache_root}/downloads" \
|
"${cache_root}/downloads" \
|
||||||
"${cache_root}/go/path" \
|
"${cache_root}/go/path" \
|
||||||
"${cache_root}/go/mod" \
|
"${cache_root}/go/mod" \
|
||||||
"${cache_root}/go/build" \
|
"${cache_root}/go/build" \
|
||||||
"${cache_root}/homebrew"
|
"${cache_root}/homebrew" 2>/dev/null; then
|
||||||
|
sudo install -d -m 0775 -o "${cache_owner}" -g "${cache_group}" \
|
||||||
|
"${cache_root}" \
|
||||||
|
"${cache_root}/bin" \
|
||||||
|
"${cache_root}/downloads" \
|
||||||
|
"${cache_root}/go/path" \
|
||||||
|
"${cache_root}/go/mod" \
|
||||||
|
"${cache_root}/go/build" \
|
||||||
|
"${cache_root}/homebrew"
|
||||||
|
fi
|
||||||
export HOMEBREW_CACHE="${cache_root}/homebrew"
|
export HOMEBREW_CACHE="${cache_root}/homebrew"
|
||||||
export GOPATH="${cache_root}/go/path"
|
export GOPATH="${cache_root}/go/path"
|
||||||
export GOMODCACHE="${cache_root}/go/mod"
|
export GOMODCACHE="${cache_root}/go/mod"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue