mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-08 11:07:18 +08:00
[macos] improve brew caching approach (#8630)
This commit is contained in:
@@ -5,8 +5,8 @@ source ~/utils/utils.sh
|
||||
arch=$(get_arch)
|
||||
|
||||
echo "Installing Homebrew..."
|
||||
HOMEBREW_INSTALL_URL="https://raw.githubusercontent.com/Homebrew/install/master/install.sh"
|
||||
/bin/bash -c "$(curl -fsSL ${HOMEBREW_INSTALL_URL})"
|
||||
download_with_retries "https://raw.githubusercontent.com/Homebrew/install/master/install.sh" "/tmp" "homebrew-install.sh"
|
||||
/bin/bash /tmp/homebrew-install.sh
|
||||
|
||||
if [[ $arch == "arm64" ]]; then
|
||||
/opt/homebrew/bin/brew update
|
||||
|
||||
@@ -7,7 +7,8 @@ source ~/utils/utils.sh
|
||||
|
||||
[ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}")
|
||||
VERSION=$(curl "${authString[@]}" -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
|
||||
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
|
||||
download_with_retries "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh" "/tmp" "nvm-install.sh"
|
||||
bash /tmp/nvm-install.sh
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
. ~/.bashrc
|
||||
|
||||
Reference in New Issue
Block a user