mirror of
https://github.com/actions/runner-images.git
synced 2025-12-19 08:22:12 +00:00
[Ubuntu 20] Add docker-moby, sbt, github-cli, prepare toolcache directory (#1002)
* add docker-moby,sbt,github-cli toolcache ruby, pypy * remove toolcache * add agentoolsdirectory * remove toolcache and toolset files * move directory creation for all Ubuntus'
This commit is contained in:
@@ -5,3 +5,9 @@ echo ImageOS=$IMAGE_OS | tee -a /etc/environment
|
||||
# This directory is supposed to be created in $HOME and owned by user(https://github.com/actions/virtual-environments/issues/491)
|
||||
mkdir -p /etc/skel/.config/configstore
|
||||
echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/skel/.bashrc
|
||||
|
||||
# Prepare directory and env variable for toolcache
|
||||
AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
|
||||
mkdir $AGENT_TOOLSDIRECTORY
|
||||
echo "AGENT_TOOLSDIRECTORY=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment
|
||||
chmod -R 777 $AGENT_TOOLSDIRECTORY
|
||||
|
||||
@@ -6,9 +6,15 @@
|
||||
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
docker_package=moby
|
||||
|
||||
# There is no stable docker-moby for Ubuntu 20 at the moment
|
||||
if isUbuntu20 ; then
|
||||
add-apt-repository "deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod testing main"
|
||||
fi
|
||||
|
||||
## Check to see if docker is already installed
|
||||
echo "Determing if Docker ($docker_package) is installed"
|
||||
if ! IsInstalled $docker_package; then
|
||||
|
||||
@@ -12,11 +12,6 @@ set -e
|
||||
|
||||
TOOLCACHE_REGISTRY="npm.pkg.github.com"
|
||||
|
||||
AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
|
||||
mkdir $AGENT_TOOLSDIRECTORY
|
||||
echo "AGENT_TOOLSDIRECTORY=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment
|
||||
chmod -R 777 $AGENT_TOOLSDIRECTORY
|
||||
|
||||
echo "Configure npm to use github package registry for '@actions' scope"
|
||||
npm config set @actions:registry "https://${TOOLCACHE_REGISTRY}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user