Files
setup-helm/action.yml
T
Thomas Seljen TvedtandGitHub 531fb92ec6 fix: retry latest version lookup and add latest-fallback opt-out (#303)
* fix: retry latest version lookup and add latest-fallback opt-out

Resolving 'version: latest' made a single request to
https://get.helm.sh/helm-latest-version and, on any failure, silently
installed the hard-coded default version. Since 'latest' resolves to
Helm 4, that fallback moves a job back a whole major version while the
step stays green.

Retry the lookup a few times with a short backoff, treat non-2xx
responses as failures instead of installing the response body, and add
a 'latest-fallback' input so callers can make the step fail instead of
installing the default version. The default keeps the existing
behavior.

* fix: do not fall back across a major version by default

Make 'latest-fallback' default to 'false', so an exhausted lookup fails
the step with the underlying error instead of installing the built-in
default version, which can be a major behind what 'latest' resolves to.
Setting the input to 'true' restores the previous behavior.

* fix: keep latest-fallback on by default

Installing the built-in default version when 'latest' cannot be
determined is documented behavior for v5, so 'latest-fallback' now
defaults to 'true' and callers opt out with 'false'. The warning
emitted on fallback names the input, so the downgrade is easy to trace
and to turn off.

* fix: cancel the unread body of a failed latest version response

A non-2xx response from the latest version URL is turned into an error
without reading its body. Cancel the body first, so its connection is
released before the next attempt instead of waiting for garbage
collection.
2026-11-04 10:50:29 -08:00

32 lines
1.2 KiB
YAML

name: 'Helm tool installer'
description: 'Install a specific version of helm binary. Acceptable values are latest or any semantic version string like 1.15.0'
inputs:
version:
description: 'Version of helm'
required: false
default: 'latest'
version-file:
description: 'Path to a .tool-versions file to read the helm version from'
required: false
token:
description: GitHub token. Used to be required to fetch the latest version
required: false
deprecationMessage: 'GitHub token is no longer required'
default: '${{ github.token }}'
downloadBaseURL:
description: 'Set the download base URL'
required: false
default: 'https://get.helm.sh'
latest-fallback:
description: "When 'version' is 'latest' and the latest version cannot be determined after retrying, install the built-in default version instead of failing. Set to 'false' to fail the step instead, since the built-in default can be a major version behind what 'latest' resolves to."
required: false
default: 'true'
outputs:
helm-path:
description: 'Path to the cached helm binary'
branding:
color: 'blue'
runs:
using: 'node24'
main: 'lib/index.js'