mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 02:18:40 +08:00
[Ubuntu] Add Ubuntu Server 22.04 LTS template (#5454)
This commit is contained in:
committed by
GitHub
parent
623df76820
commit
9d80842cc3
@@ -102,7 +102,7 @@ filter_components_by_version $minimumBuildToolVersion "${availableBuildTools[@]}
|
||||
echo "y" | $SDKMANAGER ${components[@]}
|
||||
|
||||
# Old skdmanager from sdk tools doesn't work with Java > 8, set version 8 explicitly
|
||||
if isUbuntu20; then
|
||||
if isUbuntu20 || isUbuntu22; then
|
||||
sed -i "2i export JAVA_HOME=${JAVA_HOME_8_X64}" ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager
|
||||
fi
|
||||
|
||||
|
||||
@@ -8,18 +8,16 @@
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install the AWS CLI v1 Ubuntu18 and AWS CLI v2 on Ubuntu20
|
||||
if isUbuntu20 ; then
|
||||
download_with_retries "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" "/tmp" "awscliv2.zip"
|
||||
unzip -qq /tmp/awscliv2.zip -d /tmp
|
||||
/tmp/aws/install -i /usr/local/aws-cli -b /usr/local/bin
|
||||
fi
|
||||
|
||||
# Install the AWS CLI v1 Ubuntu18 and AWS CLI v2 on Ubuntu20, Ubuntu22
|
||||
# The installation should be run after python3 is installed as aws-cli V1 dropped python2 support
|
||||
if isUbuntu18 ; then
|
||||
download_with_retries "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" "/tmp" "awscli-bundle.zip"
|
||||
unzip -qq /tmp/awscli-bundle.zip -d /tmp
|
||||
python3 /tmp/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
|
||||
else
|
||||
download_with_retries "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" "/tmp" "awscliv2.zip"
|
||||
unzip -qq /tmp/awscliv2.zip -d /tmp
|
||||
/tmp/aws/install -i /usr/local/aws-cli -b /usr/local/bin
|
||||
fi
|
||||
|
||||
download_with_retries "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" "/tmp" "session-manager-plugin.deb"
|
||||
|
||||
@@ -103,8 +103,8 @@ mv phpunit /usr/local/bin/phpunit
|
||||
|
||||
# ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php
|
||||
# see https://github.com/actions/virtual-environments/issues/1084
|
||||
if isUbuntu20 ; then
|
||||
rm /etc/apt/sources.list.d/ondrej-ubuntu-php-focal.list
|
||||
if isUbuntu20 || isUbuntu22; then
|
||||
rm /etc/apt/sources.list.d/ondrej-*.list
|
||||
apt-get update
|
||||
fi
|
||||
|
||||
|
||||
@@ -4,5 +4,19 @@
|
||||
## Desc: Installs powershellcore
|
||||
################################################################################
|
||||
|
||||
# Install Powershell
|
||||
apt-get install -y powershell
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
if isUbuntu22; then
|
||||
# Install libssl1.1
|
||||
download_with_retries "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb" "/tmp"
|
||||
dpkg -i /tmp/libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb
|
||||
|
||||
# Install Powershell
|
||||
download_with_retries "https://github.com/PowerShell/PowerShell/releases/download/v7.2.3/powershell-lts_7.2.3-1.deb_amd64.deb" "/tmp"
|
||||
dpkg -i /tmp/powershell-lts_7.2.3-1.deb_amd64.deb
|
||||
else
|
||||
# Install Powershell
|
||||
apt-get install -y powershell
|
||||
fi
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
export RUSTUP_HOME=/etc/skel/.rustup
|
||||
export CARGO_HOME=/etc/skel/.cargo
|
||||
@@ -17,7 +18,12 @@ source $CARGO_HOME/env
|
||||
|
||||
# Install common tools
|
||||
rustup component add rustfmt clippy
|
||||
cargo install --locked bindgen cbindgen cargo-audit cargo-outdated
|
||||
|
||||
if isUbuntu22; then
|
||||
cargo install bindgen cbindgen cargo-audit cargo-outdated
|
||||
else
|
||||
cargo install --locked bindgen cbindgen cargo-audit cargo-outdated
|
||||
fi
|
||||
|
||||
# Cleanup Cargo cache
|
||||
rm -rf ${CARGO_HOME}/registry/*
|
||||
|
||||
Reference in New Issue
Block a user