-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
Showing
4 changed files
with
238 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ case "$(uname -m)" in | |
dotnet | ||
) | ||
;; | ||
'x86_64') | ||
'x86_64') | ||
scripts=( | ||
basic | ||
gh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |