Skip to content

Commit

Permalink
feat: add support for arm-based runners (#72)
Browse files Browse the repository at this point in the history
Co-authored-by: Petros Andreou <p.andreou@unicaf.org>
  • Loading branch information
petrandr and petrosandreou committed Jul 14, 2023
1 parent ee09a42 commit db4a30a
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 db4a30a

Please sign in to comment.