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.