Skip to content

Commit 3e3886c

Browse files
authored
Merge pull request #79 from yokawasa/no-longer-default-latest
Tool version no longer defaults to latest but a specific version
2 parents ebd6f09 + ede4784 commit 3e3886c

File tree

6 files changed

+173
-102
lines changed

6 files changed

+173
-102
lines changed

README.md

Lines changed: 58 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ A GitHub Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeconfo
1212
|`fail-fast`|`false`|`true`| the action immediately fails when it fails to download (ie. due to a bad version) |
1313
|`arch-type`|`false`|`""`| Optional. The processor architecture type of the tool binary to setup. The action will auto-detect the architecture (`amd64` or `arm64`) and use it as appropriate at runtime. Specify the architecture type (`amd64` or `arm64`) only if you need to force it.|
1414
|`setup-tools`|`false`|`""`|List of tool name to setup. By default, the action download and setup all supported Kubernetes tools. By specifying `setup-tools` you can choose which tools the action setup. Supported separator is `return` in multi-line string. Supported tools are `kubectl`, `kustomize`, `helm`, `helmv3`, `kubeval`, `conftest`, `yq`, `rancher`, `tilt`, `skaffold`, `kube-score`|
15-
|`kubectl`|`false`|`latest`| kubectl version or `latest`. kubectl versions can be found [here](https://github.com/kubernetes/kubernetes/releases)|
16-
|`kustomize`|`false`|`latest`| kustomize version or `latest`. kustomize versions can be found [here](https://github.com/kubernetes-sigs/kustomize/releases)|
17-
|`helm`|`false`|`latest`| helm version or `latest`. helm versions can be found [here](https://github.com/helm/helm/releases)|
18-
|`kubeval`|`false`|`latest`| kubeval version (must be **0.16.1+**) or `latest`. kubeval versions can be found [here](https://github.com/instrumenta/kubeval/releases).<br> NOTE: this parameter is deprecating as `kubeval` is no longer maintained. A good replacement is [kubeconform](https://github.com/yannh/kubeconform). See also [this](https://github.com/instrumenta/kubeval) for more details.|
19-
|`kubeconform`|`false`|`latest`| kubeconform version or `latest`. kubeconform versions can be found [here](https://github.com/yannh/kubeconform/releases)|
20-
|`conftest`|`false`|`latest`| conftest version or `latest`. conftest versions can be found [here](https://github.com/open-policy-agent/conftest/releases)|
21-
|`yq`|`false`|`latest`| yq version or `latest`. yq versions can be found [here](https://github.com/mikefarah/yq/releases/)|
22-
|`rancher`|`false`|`latest`| Rancher CLI version or `latest`. Rancher CLI versions can be found [here](https://github.com/rancher/cli/releases)|
23-
|`tilt`|`false`|`latest`| Tilt version or `latest`. Tilt versions can be found [here](https://github.com/tilt-dev/tilt/releases)|
24-
|`skaffold`|`false`|`latest`| Skaffold version or `latest`. Skaffold versions can be found [here](https://github.com/GoogleContainerTools/skaffold/releases)|
25-
|`kube-score`|`false`|`latest`| kube-score version or `latest`. kube-score versions can be found [here](https://github.com/zegl/kube-score/releases)|
15+
|`kubectl`|`false`|`1.34.1`| kubectl version or `latest`. kubectl versions can be found [here](https://github.com/kubernetes/kubernetes/releases)|
16+
|`kustomize`|`false`|`5.7.1`| kustomize version or `latest`. kustomize versions can be found [here](https://github.com/kubernetes-sigs/kustomize/releases)|
17+
|`helm`|`false`|`3.19.0`| helm version or `latest`. helm versions can be found [here](https://github.com/helm/helm/releases)|
18+
|`kubeval`|`false`|`0.16.1`| kubeval version (must be **0.16.1+**) or `latest`. kubeval versions can be found [here](https://github.com/instrumenta/kubeval/releases).<br> NOTE: this parameter is deprecating as `kubeval` is no longer maintained. A good replacement is [kubeconform](https://github.com/yannh/kubeconform). See also [this](https://github.com/instrumenta/kubeval) for more details.|
19+
|`kubeconform`|`false`|`0.7.0`| kubeconform version or `latest`. kubeconform versions can be found [here](https://github.com/yannh/kubeconform/releases)|
20+
|`conftest`|`false`|`0.62.0`| conftest version or `latest`. conftest versions can be found [here](https://github.com/open-policy-agent/conftest/releases)|
21+
|`yq`|`false`|`4.47.2`| yq version or `latest`. yq versions can be found [here](https://github.com/mikefarah/yq/releases/)|
22+
|`rancher`|`false`|`2.12.1`| Rancher CLI version or `latest`. Rancher CLI versions can be found [here](https://github.com/rancher/cli/releases)|
23+
|`tilt`|`false`|`0.35.1`| Tilt version or `latest`. Tilt versions can be found [here](https://github.com/tilt-dev/tilt/releases)|
24+
|`skaffold`|`false`|`2.16.1`| Skaffold version or `latest`. Skaffold versions can be found [here](https://github.com/GoogleContainerTools/skaffold/releases)|
25+
|`kube-score`|`false`|`1.20.0`| kube-score version or `latest`. kube-score versions can be found [here](https://github.com/zegl/kube-score/releases)|
2626

2727
> [!NOTE]
2828
> - Supported Environments: `Linux`
2929
> - From `v0.7.0`, the action supports tool version 'v' prefix. Prior to v0.7.0, the action only accept the tool version without 'v' prefix but from v0.7.0 the action automatically add/remove the prefix as necessary
30-
> - From `v0.13.0`, all tools use `latest` as the default version. However, using `latest` can make builds non-reproducible, as the installed version may change over time. For stable and repeatable builds, **it is recommended to specify exact versions**
31-
>
30+
> - From `v0.13.X`, the action supports `latest` as tool version. If a tool input is set to `latest`, the action resolves the latest version at runtime, then downloads and caches that exact version. However, using `latest` can make builds non-reproducible, as the installed version may change over time. For stable and repeatable builds, **it is recommended to specify exact versions**
31+
3232
### Outputs
3333
|Parameter|Description|
3434
|:--:|:--|
@@ -53,17 +53,17 @@ Pinned versions (reproducible):
5353
runs-on: ubuntu-latest
5454
steps:
5555
- uses: actions/checkout@v4
56-
- uses: yokawasa/[email protected].0
56+
- uses: yokawasa/[email protected].1
5757
with:
58-
kubectl: '1.25'
59-
kustomize: '5.0.0'
60-
helm: '3.11.1'
61-
kubeconform: '0.5.0'
62-
conftest: '0.39.0'
63-
rancher: '2.7.0'
64-
tilt: '0.31.2'
65-
skaffold: '2.1.0'
66-
kube-score: '1.16.1'
58+
kubectl: '1.34.1'
59+
kustomize: '5.7.1'
60+
helm: '3.19.0'
61+
kubeconform: '0.7.0'
62+
conftest: '0.62.0'
63+
rancher: '2.12.1'
64+
tilt: '0.35.2'
65+
skaffold: '2.16.1'
66+
kube-score: '1.20.0'
6767
- run: |
6868
kubectl version --client
6969
kustomize version
@@ -77,14 +77,14 @@ Pinned versions (reproducible):
7777
kube-score version
7878
```
7979
80-
Default behavior (latest) — no inputs:
80+
Default versions for the commands will be setup if you don't give any inputs like this:
8181
8282
```yaml
8383
test:
8484
runs-on: ubuntu-latest
8585
steps:
8686
- uses: actions/checkout@v4
87-
- uses: yokawasa/[email protected].0
87+
- uses: yokawasa/[email protected].1
8888
- run: |
8989
kubectl version --client
9090
kustomize version
@@ -98,20 +98,24 @@ Default behavior (latest) — no inputs:
9898
kube-score version
9999
```
100100
101-
Selecting tools with default latest versions (using `setup-tools`):
101+
By specifying setup-tools you can choose which tools the action setup. Supported separator is return in multi-line string like this
102102
103103
```yaml
104104
test:
105105
runs-on: ubuntu-latest
106106
steps:
107107
- uses: actions/checkout@v4
108-
- uses: yokawasa/[email protected].0
108+
- uses: yokawasa/[email protected].1
109109
with:
110110
setup-tools: |
111111
kubectl
112112
helm
113113
kustomize
114114
skaffold
115+
kubectl: '1.25'
116+
helm: '3.11.1'
117+
kustomize: '5.0.0'
118+
skaffold: '2.1.0'
115119
- run: |
116120
kubectl version --client
117121
kustomize version
@@ -125,7 +129,7 @@ Architecture is automatically detected on the runner (amd64 or arm64). You can o
125129
test:
126130
steps:
127131
- uses: actions/checkout@v4
128-
- uses: yokawasa/[email protected].0
132+
- uses: yokawasa/[email protected].1
129133
with:
130134
# arch-type is optional; uncomment to force arm64
131135
# arch-type: 'arm64'
@@ -134,23 +138,41 @@ Architecture is automatically detected on the runner (amd64 or arm64). You can o
134138
helm
135139
kustomize
136140
skaffold
141+
kubectl: '1.25'
142+
helm: '3.11.1'
143+
kustomize: '5.0.0'
144+
skaffold: '2.1.0'
137145
- run: |
138146
kubectl version --client
139147
kustomize version
140148
helm version
141149
skaffold version
150+
```
142151

143152
Explicit latest inputs (optional):
144153

145154
```yaml
146-
steps:
147-
- uses: actions/checkout@v4
148-
- uses: yokawasa/[email protected]
149-
with:
150-
kubectl: latest
151-
helm: latest
152-
kustomize: latest
153-
skaffold: latest
155+
test:
156+
steps:
157+
- uses: actions/checkout@v4
158+
- uses: yokawasa/[email protected]
159+
with:
160+
# arch-type is optional; uncomment to force arm64
161+
# arch-type: 'arm64'
162+
setup-tools: |
163+
kubectl
164+
helm
165+
kustomize
166+
skaffold
167+
kubectl: latest
168+
helm: latest
169+
kustomize: latest
170+
skaffold: latest
171+
- run: |
172+
kubectl version --client
173+
kustomize version
174+
helm version
175+
skaffold version
154176
```
155177

156178
Note: Using `latest` makes builds non-reproducible since versions can change over time. Prefer pinning exact versions for stability.

action.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,47 @@ inputs:
1515
description: 'List of tool name to setup. By default, the action download and setup all supported Kubernetes tools. By specifying "setup-tools" you can choose which tools the action setup. Supported separator is return in multi-line string. Supported tools are "kubectl", "kustomize", "helm", "helmv3", "kubeval", "conftest", "yq", "rancher", "tilt", "skaffold", "kube-score"'
1616
kubectl:
1717
required: false
18-
default: 'latest'
18+
default: '1.34.1'
1919
description: "kubectl version or 'latest'"
2020
kustomize:
2121
required: false
22-
default: 'latest'
22+
default: '5.7.1'
2323
description: "kustomize version or 'latest'"
2424
helm:
2525
required: false
26-
default: 'latest'
26+
default: '3.19.0'
2727
description: "helm version or 'latest'"
2828
kubeval:
2929
required: false
30-
default: 'latest'
30+
default: '0.16.1'
3131
description: "kubeval version or 'latest'"
3232
kubeconform:
3333
required: false
34-
default: 'latest'
34+
default: '0.7.0'
3535
description: "kubeconform version or 'latest'"
3636
conftest:
3737
required: false
38-
default: 'latest'
38+
default: '0.62.0'
3939
description: "conftest version or 'latest'"
4040
yq:
4141
required: false
42-
default: 'latest'
42+
default: '4.47.2'
4343
description: "yq version or 'latest'"
4444
rancher:
4545
required: false
46-
default: 'latest'
46+
default: '2.12.1'
4747
description: "rancher cli version or 'latest'"
4848
tilt:
4949
required: false
50-
default: 'latest'
50+
default: '0.35.1'
5151
description: "tilt version or 'latest'"
5252
skaffold:
5353
required: false
54-
default: 'latest'
54+
default: '2.16.1'
5555
description: "skaffold version or 'latest'"
5656
kube-score:
5757
required: false
58-
default: 'latest'
58+
default: '1.20.0'
5959
description: "kube-score version or 'latest'"
6060
outputs:
6161
kubectl-path:
@@ -83,4 +83,4 @@ branding:
8383
color: 'blue'
8484
runs:
8585
using: 'node20'
86-
main: 'dist/index.js'
86+
main: 'dist/index.mjs'

0 commit comments

Comments
 (0)