Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ko-build/setup-ko
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8
Choose a base ref
...
head repository: ko-build/setup-ko
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9
Choose a head ref
  • 7 commits
  • 4 files changed
  • 2 contributors

Commits on Jan 21, 2025

  1. Bump actions/setup-go from 5.2.0 to 5.3.0 in the all group

    Bumps the all group with 1 update: [actions/setup-go](https://github.com/actions/setup-go).
    
    
    Updates `actions/setup-go` from 5.2.0 to 5.3.0
    - [Release notes](https://github.com/actions/setup-go/releases)
    - [Commits](actions/setup-go@3041bf5...f111f33)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-go
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 21, 2025
    Copy the full SHA
    16ccb8f View commit details
  2. Merge pull request #43 from ko-build/dependabot/github_actions/all-4f…

    …79472919
    
    Bump actions/setup-go from 5.2.0 to 5.3.0 in the all group
    cpanato authored Jan 21, 2025
    Copy the full SHA
    d6f2a0b View commit details

Commits on Jan 22, 2025

  1. add option to use sudo

    Signed-off-by: cpanato <ctadeu@gmail.com>
    cpanato committed Jan 22, 2025
    Copy the full SHA
    b7a9426 View commit details
  2. cleanup and updates

    Signed-off-by: cpanato <ctadeu@gmail.com>
    cpanato committed Jan 22, 2025
    Copy the full SHA
    a230267 View commit details
  3. Merge pull request #44 from cpanato/fix-sudo

    Fix sudo
    cpanato authored Jan 22, 2025
    Copy the full SHA
    fc22553 View commit details

Commits on Mar 19, 2025

  1. Bump actions/setup-go from 5.3.0 to 5.4.0 in the all group

    Bumps the all group with 1 update: [actions/setup-go](https://github.com/actions/setup-go).
    
    
    Updates `actions/setup-go` from 5.3.0 to 5.4.0
    - [Release notes](https://github.com/actions/setup-go/releases)
    - [Commits](actions/setup-go@f111f33...0aaccfd)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-go
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 19, 2025
    Copy the full SHA
    fd988b4 View commit details
  2. Merge pull request #46 from ko-build/dependabot/github_actions/all-22…

    …2032bfaf
    
    Bump actions/setup-go from 5.3.0 to 5.4.0 in the all group
    cpanato authored Mar 19, 2025
    Copy the full SHA
    d006021 View commit details
Showing with 27 additions and 17 deletions.
  1. +3 −3 .github/workflows/ci.yaml
  2. +1 −1 .github/workflows/use-action.yaml
  3. +13 −12 README.md
  4. +10 −1 action.yml
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@ jobs:
runner:
- ubuntu-latest
- ubuntu-latest-arm

runs-on: ${{matrix.runner}}

steps:
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: '1.22'
go-version: '1.23'
check-latest: 'true'

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2 changes: 1 addition & 1 deletion .github/workflows/use-action.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: '1.22'
check-latest: 'true'
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

> :warning: Note: `ko` recently [moved to its own GitHub org](https://github.com/ko-build/ko/issues/791), which broke `setup-ko@v0.5` if the `ko` version wasn't specified.
>
> To fix this, either upgrade to [`setup-ko@v0.6`](https://github.com/ko-build/setup-ko/releases/tag/v0.6) or specify `version`
> To fix this, either upgrade to >= [`setup-ko@v0.6`](https://github.com/ko-build/setup-ko/releases/tag/v0.6) or specify `version`
## Example usage

@@ -20,12 +20,12 @@ jobs:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20.x'
- uses: actions/checkout@v3
go-version: '1.23.x'

- uses: ko-build/setup-ko@v0.6
- uses: ko-build/setup-ko@v0.8
- run: ko build
```
@@ -45,9 +45,9 @@ By default, `ko-build/setup-ko` installs the [latest released version of `ko`](h
You can select a version with the `version` parameter:

```yaml
- uses: ko-build/setup-ko@v0.6
- uses: ko-build/setup-ko@v0.8
with:
version: v0.14.1
version: v0.17.1
```

To build and install `ko` from source using `go install`, specify `version: tip`.
@@ -64,7 +64,7 @@ You can use [encrypted secrets](https://docs.github.com/en/actions/reference/enc
```yaml
steps:
...
- uses: ko-build/setup-ko@v0.6
- uses: ko-build/setup-ko@v0.8
env:
KO_DOCKER_REPO: my.registry/my-repo
- env:
@@ -94,11 +94,12 @@ jobs:
name: Publish Release YAML
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: actions/checkout@v3
- uses: ko-build/setup-ko@v0.6
go-version: '1.23'
- uses: ko-build/setup-ko@v0.8
- name: Generate and upload release.yaml
env:
11 changes: 10 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -8,13 +8,22 @@ inputs:
description: 'Version of ko to install (tip, latest-release, v0.14.1, etc.)'
required: true
default: 'latest-release'
use-sudo:
description: 'set to true if install-dir location requires sudo privs'
required: false
default: 'false'
runs:
using: "composite"
steps:
- shell: bash
run: |
set -ex
SUDO=
if [[ "${{ inputs.use-sudo }}" == "true" ]] && command -v sudo >/dev/null; then
SUDO=sudo
fi
# Install ko:
# - if version is "tip", install from tip of main.
# - if version is "latest-release", look up latest release.
@@ -41,7 +50,7 @@ runs:
fi
if [[ ! -z ${tag} ]]; then
echo "Installing ko @ ${tag} for ${os} ${arch}"
curl -fsL https://github.com/ko-build/ko/releases/download/${tag}/ko_${tag:1}_${os}_${arch}.tar.gz | tar xzf - -C /usr/local/bin ko
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
fi
if [[ ! -z ${KO_DOCKER_REPO} ]]; then