mirror of
https://github.com/actions/runner-images.git
synced 2026-01-07 18:58:13 +08:00
[macOS] Implement new directories hierarchy (#8741)
This commit is contained in:
committed by
GitHub
parent
5d40b1e213
commit
8d6a01b370
22
images/macos/scripts/build/node.sh
Normal file
22
images/macos/scripts/build/node.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
defaultVersion=$(get_toolset_value '.node.default')
|
||||
|
||||
echo "Installing Node.js $defaultVersion"
|
||||
brew_smart_install "node@$defaultVersion"
|
||||
brew link node@$defaultVersion --force --overwrite
|
||||
|
||||
echo Installing yarn...
|
||||
download_with_retries "https://yarnpkg.com/install.sh" "/tmp" "yarn-install.sh"
|
||||
bash /tmp/yarn-install.sh
|
||||
|
||||
if is_BigSur || is_Monterey; then
|
||||
npm_global_packages=$(get_toolset_value '.npm.global_packages[].name')
|
||||
for module in ${npm_global_packages[@]}; do
|
||||
echo "Install $module"
|
||||
npm install -g $module
|
||||
done
|
||||
fi
|
||||
|
||||
invoke_tests "Node" "Node.js"
|
||||
Reference in New Issue
Block a user