Skip to content

Commit 2a5f936

Browse files
authored
Merge pull request #29 from hsblhsn/main
feat: get arch from runner context.
2 parents 8c6791a + d632f4f commit 2a5f936

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

action.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ runs:
3232
esac
3333
3434
os=${{ runner.os }}
35+
arch=$(echo "${{ runner.arch }}" | tr '[:upper:]' '[:lower:]')
3536
if [[ $os == "macOS" ]]; then
3637
os="Darwin"
3738
fi
38-
39+
if [[ $arch == "x64" ]]; then
40+
arch="x86_64"
41+
fi
3942
if [[ ! -z ${tag} ]]; then
40-
echo "Installing ko @ ${tag} for ${os}"
41-
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
43+
echo "Installing ko @ ${tag} for ${os} ${arch}"
44+
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
4245
fi
4346
4447
if [[ ! -z ${KO_DOCKER_REPO} ]]; then

0 commit comments

Comments
 (0)