mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Migrate /etc/environment modifications to helpers (#660)
* migrate rust * Migrate PHP composer * Migrate dotnet core sdk * rename `var_*` to `variable_*` * rename *etcEnvironmentVar functions to *etcEnvironmentVariable * add AppendEtcEnvironmentVariable and PrependEtcEnvironmentVariable * rename addEtcEnvironmentPathElement to prependEtcEnvironmentPath * Remove updatepath.sh Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
@@ -276,6 +277,9 @@ php composer-setup.php
|
||||
sudo mv composer.phar /usr/bin/composer
|
||||
php -r "unlink('composer-setup.php');"
|
||||
|
||||
# Update /etc/environment
|
||||
prependEtcEnvironmentPath /home/runner/.config/composer/vendor/bin
|
||||
|
||||
# Add composer bin folder to path
|
||||
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> /etc/skel/.bashrc
|
||||
|
||||
@@ -293,6 +297,7 @@ for cmd in php php5.6 php7.0 php7.1 php7.2 php7.3 php7.4 composer phpunit; do
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "PHP 5.6 ($(php5.6 --version | head -n 1))"
|
||||
|
||||
Reference in New Issue
Block a user