You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
> :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.
6
6
>
7
-
> To fix this, either upgrade to [`setup-ko@v0.6`](https://github.com/ko-build/setup-ko/releases/tag/v0.6) or specify `version`
7
+
> To fix this, either upgrade to >= [`setup-ko@v0.6`](https://github.com/ko-build/setup-ko/releases/tag/v0.6) or specify `version`
8
8
9
9
## Example usage
10
10
@@ -20,12 +20,12 @@ jobs:
20
20
name: Publish
21
21
runs-on: ubuntu-latest
22
22
steps:
23
-
- uses: actions/setup-go@v4
23
+
- uses: actions/checkout@v4
24
+
- uses: actions/setup-go@v5
24
25
with:
25
-
go-version: '1.20.x'
26
-
- uses: actions/checkout@v3
26
+
go-version: '1.23.x'
27
27
28
-
- uses: ko-build/setup-ko@v0.6
28
+
- uses: ko-build/setup-ko@v0.8
29
29
- run: ko build
30
30
```
31
31
@@ -45,9 +45,9 @@ By default, `ko-build/setup-ko` installs the [latest released version of `ko`](h
45
45
You can select a version with the `version` parameter:
46
46
47
47
```yaml
48
-
- uses: ko-build/setup-ko@v0.6
48
+
- uses: ko-build/setup-ko@v0.8
49
49
with:
50
-
version: v0.14.1
50
+
version: v0.17.1
51
51
```
52
52
53
53
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
Copy file name to clipboardExpand all lines: action.yml
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,22 @@ inputs:
8
8
description: 'Version of ko to install (tip, latest-release, v0.14.1, etc.)'
9
9
required: true
10
10
default: 'latest-release'
11
+
use-sudo:
12
+
description: 'set to true if install-dir location requires sudo privs'
13
+
required: false
14
+
default: 'false'
11
15
runs:
12
16
using: "composite"
13
17
steps:
14
18
- shell: bash
15
19
run: |
16
20
set -ex
17
21
22
+
SUDO=
23
+
if [[ "${{ inputs.use-sudo }}" == "true" ]] && command -v sudo >/dev/null; then
24
+
SUDO=sudo
25
+
fi
26
+
18
27
# Install ko:
19
28
# - if version is "tip", install from tip of main.
20
29
# - if version is "latest-release", look up latest release.
@@ -41,7 +50,7 @@ runs:
41
50
fi
42
51
if [[ ! -z ${tag} ]]; then
43
52
echo "Installing ko @ ${tag} for ${os} ${arch}"
44
-
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
53
+
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
0 commit comments