feat: Add yq to act (#117)
* feat: update install script * fix: revert toolset path Since there's a lot of hard-coded references to this path. * feat: Adds yq script Unlike upstream we detect the arch suffix here. * feat: include yq in act and custom flavors * fix: include armhf in supported arch for act.yml * fix: PR feedback, don't need to install twice for custom
This commit is contained in:
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: yq.sh
|
||||
## Desc: Installs YQ
|
||||
## Supply chain security: YQ - checksum validation
|
||||
################################################################################
|
||||
# source: https://github.com/actions/runner-images/blob/5d6938f680075d63fa71f8aa70990866cd12884b/images/linux/scripts/installers/yq.sh
|
||||
|
||||
# Source the helpers for use with the script
|
||||
. /imagegeneration/installers/helpers/install.sh
|
||||
|
||||
yq_arch() {
|
||||
case "$(uname -m)" in
|
||||
'aarch64') echo 'arm64' ;;
|
||||
'x86_64') echo 'amd64' ;;
|
||||
'armv7l') echo 'arm' ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Download YQ
|
||||
base_url="https://github.com/mikefarah/yq/releases/latest/download"
|
||||
filename="yq_linux_$(yq_arch)"
|
||||
download_with_retries "${base_url}/${filename}" "/tmp" "yq"
|
||||
# Supply chain security - YQ
|
||||
external_hash=$(get_hash_from_remote_file "${base_url}/checksums" "${filename} " "" " " "19")
|
||||
use_checksum_comparison "/tmp/yq" "${external_hash}"
|
||||
# Install YQ
|
||||
sudo install /tmp/yq /usr/bin/yq
|
||||
Reference in New Issue
Block a user