mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
* add test for Git * Add Heroku * Add hhvm * Add Homebrew * Add Julia * Add kind * Add Kubernetes Tools * Remove kind and homebrew validate * replace capital letter * Add Leiningen * add source to Leiningen * Add Mercurial * Add conda * Add Netlify * Add packer * Add pollinate * Add Pulumi * Add Phantomjs * Add Haveged * Fix for kubectl * Fix julia installation * Add installer_script_folder env variable to run tests in brew provisioner * Add delay after reboot * Adjust pause settings
28 lines
1.1 KiB
Bash
28 lines
1.1 KiB
Bash
#!/bin/bash -e
|
|
################################################################################
|
|
## File: homebrew.sh
|
|
## Desc: Installs the Homebrew on Linux
|
|
## Caveat: Brew MUST NOT be used to install any tool during the image build to avoid dependencies, which may come along with the tool
|
|
################################################################################
|
|
|
|
# Source the helpers
|
|
source $HELPER_SCRIPTS/etc-environment.sh
|
|
source $HELPER_SCRIPTS/invoke-tests.sh
|
|
|
|
# Install the Homebrew on Linux
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
|
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
|
|
|
# Update /etc/environemnt
|
|
## Put HOMEBREW_* variables
|
|
brew shellenv|grep 'export HOMEBREW'|sed -E 's/^export (.*);$/\1/' | sudo tee -a /etc/environment
|
|
# add brew executables locations to PATH
|
|
brew_path=$(brew shellenv|grep '^export PATH' |sed -E 's/^export PATH="([^$]+)\$.*/\1/')
|
|
prependEtcEnvironmentPath "$brew_path"
|
|
|
|
# Validate the installation ad hoc
|
|
echo "Validate the installation reloading /etc/environment"
|
|
reloadEtcEnvironment
|
|
|
|
invoke_tests "Tools" "Homebrew"
|