mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
19 lines
786 B
Bash
19 lines
786 B
Bash
#!/bin/bash -e
|
|
################################################################################
|
|
## File: google-cloud-sdk.sh
|
|
## Desc: Installs the Google Cloud SDK
|
|
################################################################################
|
|
|
|
# Install the Google Cloud SDK
|
|
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://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
|