Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the documentation to specify v before 'version' and code chan… #15

Merged
merged 1 commit into from May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
# Setup Helm
#### Install a specific version of helm binary on the runner.

Acceptable values are latest or any semantic version string like `1.15.0`. Use this action in workflow to define which version of helm will be used.
Acceptable values are latest or any semantic version string like v2.16.7 Use this action in workflow to define which version of helm will be used.

```yaml
- uses: azure/setup-helm@v1
Expand Down
3 changes: 3 additions & 0 deletions lib/run.js
Expand Up @@ -130,6 +130,9 @@ function run() {
if (version.toLocaleLowerCase() === 'latest') {
version = yield getStableHelmVersion();
}
else if (!version.toLocaleLowerCase().startsWith('v')) {
version = 'v' + version;
}
let cachedPath = yield downloadHelm(version);
try {
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
Expand Down
2 changes: 2 additions & 0 deletions src/run.ts
Expand Up @@ -120,6 +120,8 @@ async function run() {
let version = core.getInput('version', { 'required': true });
if (version.toLocaleLowerCase() === 'latest') {
version = await getStableHelmVersion();
} else if (!version.toLocaleLowerCase().startsWith('v')) {
version = 'v' + version;
}

let cachedPath = await downloadHelm(version);
Expand Down