mirror of
https://github.com/actions/runner-images.git
synced 2026-01-08 11:30:49 +08:00
[Ubuntu] Implement new directories hierarchy (#8627)
This commit is contained in:
committed by
GitHub
parent
d1f2c9a3be
commit
5d40b1e213
18
images/ubuntu/scripts/build/nvm.sh
Normal file
18
images/ubuntu/scripts/build/nvm.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: nvm.sh
|
||||
## Desc: Installs Nvm
|
||||
################################################################################
|
||||
|
||||
export NVM_DIR="/etc/skel/.nvm"
|
||||
mkdir $NVM_DIR
|
||||
VERSION=$(curl -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
|
||||
echo 'NVM_DIR=$HOME/.nvm' | tee -a /etc/environment
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' | tee -a /etc/skel/.bash_profile
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
|
||||
invoke_tests "Tools" "nvm"
|
||||
|
||||
# set system node.js as default one
|
||||
nvm alias default system
|
||||
Reference in New Issue
Block a user