Skip to content

Commit

Permalink
Merge pull request #6 from bbednarek//issues/5
Browse files Browse the repository at this point in the history
Download crane binary corresponding to underlying runner architecture
  • Loading branch information
imjasonh authored Feb 15, 2023
2 parents e82f1b9 + 8a78c72 commit 779a724
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 779a724

Please sign in to comment.