mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Inital commit.
This commit is contained in:
25
images/linux/scripts/installers/google-cloud-sdk.sh
Normal file
25
images/linux/scripts/installers/google-cloud-sdk.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: google-cloud-sdk.sh
|
||||
## Desc: Installs the Google Cloud SDK
|
||||
################################################################################
|
||||
|
||||
# Source the helpers
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# Install the Google Cloud SDK
|
||||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
||||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y google-cloud-sdk
|
||||
|
||||
# Validate the installation
|
||||
echo "Validate the installation"
|
||||
if ! command -v gcloud; then
|
||||
echo "gcloud was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document the installed version
|
||||
echo "Document the installed version"
|
||||
DocumentInstalledItem "Google Cloud SDK ($(gcloud --version | head -n 1 | cut -d ' ' -f 4))"
|
||||
Reference in New Issue
Block a user