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 - uses: actions/checkout@v2
# Minimal publish # Minimal publish
- uses: imjasonh/setup-ko@v0.1 - uses: imjasonh/setup-ko@main
- run: ko publish --bare ./ - run: ko publish --bare ./
# Install an old release. # Install an old release.

View File

@ -29,9 +29,14 @@ runs:
tag="${{ inputs.version }}" tag="${{ inputs.version }}"
esac esac
os=${{ runner.os }}
if [[ $os == "macOS" ]]; then
os="Darwin"
fi
if [[ ! -z ${tag} ]]; then if [[ ! -z ${tag} ]]; then
echo "Installing ko @ ${tag}" echo "Installing ko @ ${tag} for ${os}"
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 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 fi
# NB: username doesn't seem to matter. # NB: username doesn't seem to matter.