diff --git a/action.yml b/action.yml index 7bd5dae..43aa4df 100644 --- a/action.yml +++ b/action.yml @@ -35,10 +35,15 @@ runs: if [[ $os == "macOS" ]]; then os="Darwin" fi + + arch=$(uname -m) + if [[ "$arch" =~ (aarch64|arm64) ]] ; then + arch=arm64 + fi if [[ ! -z ${tag} ]]; then - echo "Installing crane @ ${tag} for ${os}" - curl -fsL https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_x86_64.tar.gz | sudo tar xzf - -C /usr/local/bin crane + echo "Installing crane @ ${tag} for ${os} on ${arch}" + curl -fsL https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_${arch}.tar.gz | sudo tar xzf - -C /usr/local/bin crane fi # NB: username doesn't seem to matter.