mirror of
https://github.com/actions/runner-images.git
synced 2025-12-19 08:22:12 +00:00
Add Ubuntu-Slim image definition (#13423)
Add ubuntu-slim image definition
This commit is contained in:
22
images/ubuntu-slim/scripts/build/install-github-cli.sh
Normal file
22
images/ubuntu-slim/scripts/build/install-github-cli.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: install-github-cli.sh
|
||||
## Desc: Install GitHub CLI
|
||||
## Must be run as non-root user after homebrew
|
||||
## Supply chain security: GitHub CLI - checksum validation
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Download GitHub CLI
|
||||
gh_cli_url=$(resolve_github_release_asset_url "cli/cli" "contains(\"linux\") and contains(\"amd64\") and endswith(\".deb\")" "latest")
|
||||
gh_cli_deb_path=$(download_with_retry "$gh_cli_url")
|
||||
|
||||
# Supply chain security - GitHub CLI
|
||||
hash_url=$(resolve_github_release_asset_url "cli/cli" "endswith(\"checksums.txt\")" "latest")
|
||||
external_hash=$(get_checksum_from_url "$hash_url" "linux_amd64.deb" "SHA256")
|
||||
use_checksum_comparison "$gh_cli_deb_path" "$external_hash"
|
||||
|
||||
# Install GitHub CLI
|
||||
apt-get install "$gh_cli_deb_path"
|
||||
Reference in New Issue
Block a user