From 9ca5e8d0ba79564a8817c24370d81913babc544c Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Wed, 28 Apr 2021 22:50:44 -0400 Subject: [PATCH] support macos runner maybe? --- .github/workflows/use-action.yaml | 2 +- action.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/use-action.yaml b/.github/workflows/use-action.yaml index b81be84..3a9879d 100644 --- a/.github/workflows/use-action.yaml +++ b/.github/workflows/use-action.yaml @@ -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. diff --git a/action.yml b/action.yml index 062b495..d05aaa1 100644 --- a/action.yml +++ b/action.yml @@ -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.