Skip to content

Commit

Permalink
Merge pull request #29 from hsblhsn/main
Browse files Browse the repository at this point in the history
feat: get arch from runner context.
  • Loading branch information
cpanato authored Jan 15, 2025
2 parents 8c6791a + d632f4f commit 2a5f936
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ runs:
esac
os=${{ runner.os }}
arch=$(echo "${{ runner.arch }}" | tr '[:upper:]' '[:lower:]')
if [[ $os == "macOS" ]]; then
os="Darwin"
fi
if [[ $arch == "x64" ]]; then
arch="x86_64"
fi
if [[ ! -z ${tag} ]]; then
echo "Installing ko @ ${tag} for ${os}"
curl -fsL https://github.com/ko-build/ko/releases/download/${tag}/ko_${tag:1}_${os}_x86_64.tar.gz | sudo tar xzf - -C /usr/local/bin ko
echo "Installing ko @ ${tag} for ${os} ${arch}"
curl -fsL https://github.com/ko-build/ko/releases/download/${tag}/ko_${tag:1}_${os}_${arch}.tar.gz | sudo tar xzf - -C /usr/local/bin ko
fi
if [[ ! -z ${KO_DOCKER_REPO} ]]; then
Expand Down

0 comments on commit 2a5f936

Please sign in to comment.