mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 18:19:54 +08:00
Add Ubuntu-Slim image definition (#13423)
Add ubuntu-slim image definition
This commit is contained in:
22
images/ubuntu-slim/scripts/build/install-yq.sh
Normal file
22
images/ubuntu-slim/scripts/build/install-yq.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: install-yq.sh
|
||||
## Desc: Install yq - a command-line YAML, JSON and XML processor
|
||||
## Supply chain security: yq - checksum validation
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Download yq
|
||||
yq_url=$(resolve_github_release_asset_url "mikefarah/yq" "endswith(\"yq_linux_amd64\")" "latest")
|
||||
binary_path=$(download_with_retry "${yq_url}")
|
||||
|
||||
# Supply chain security - yq
|
||||
hash_url=$(resolve_github_release_asset_url "mikefarah/yq" "endswith(\"checksums\")" "latest")
|
||||
external_hash=$(get_checksum_from_url "${hash_url}" "yq_linux_amd64 " "SHA256" "true" " " "19")
|
||||
use_checksum_comparison "$binary_path" "$external_hash"
|
||||
|
||||
# Install yq
|
||||
install "$binary_path" /usr/bin/yq
|
||||
|
||||
Reference in New Issue
Block a user