support macos runner maybe?

This commit is contained in:
Jason Hall 2021-04-28 22:50:44 -04:00
parent ee6e2b30d5
commit 9ca5e8d0ba
2 changed files with 8 additions and 3 deletions

View File

@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
# Minimal publish
- uses: imjasonh/setup-ko@v0.1
- uses: imjasonh/setup-ko@main
- run: ko publish --bare ./
# Install an old release.

View File

@ -29,9 +29,14 @@ runs:
tag="${{ inputs.version }}"
esac
os=${{ runner.os }}
if [[ $os == "macOS" ]]; then
os="Darwin"
fi
if [[ ! -z ${tag} ]]; then
echo "Installing ko @ ${tag}"
curl -fsL https://github.com/google/ko/releases/download/${tag}/ko_${tag:1}_Linux_x86_64.tar.gz | sudo tar xzf - -C /usr/local/bin ko
echo "Installing ko @ ${tag} for ${os}"
curl -fsL https://github.com/google/ko/releases/download/${tag}/ko_${tag:1}_${os}_x86_64.tar.gz | sudo tar xzf - -C /usr/local/bin ko
fi
# NB: username doesn't seem to matter.