Skip to content

Commit

Permalink
add support for arm-based runners
Browse files Browse the repository at this point in the history
  • Loading branch information
petrosandreou committed Jul 14, 2023
1 parent ee09a42 commit 53acae6
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions deps.sh
Expand Up @@ -9,6 +9,20 @@ fi
version=${GH_CLI_VERSION:-2.8.0}
echo "Installing gh cli in version: $version"

wget https://github.com/cli/cli/releases/download/v${version}/gh_${version}_linux_amd64.tar.gz
tar -xvf gh_${version}_linux_amd64.tar.gz
sudo cp $(pwd)/gh_${version}_linux_amd64/bin/gh /usr/local/bin/
machine=$(uname -m)
case $machine in
aarch64)
arch="arm64"
;;
x86_64)
arch="amd64"
;;
*)
echo "Unsupported architecture: $machine"
exit 1
;;
esac

wget https://github.com/cli/cli/releases/download/v${version}/gh_${version}_linux_${arch}.tar.gz
tar -xvf gh_${version}_linux_${arch}.tar.gz
sudo cp $(pwd)/gh_${version}_linux_${arch}/bin/gh /usr/local/bin/

0 comments on commit 53acae6

Please sign in to comment.