mirror of
https://github.com/Azure/setup-helm.git
synced 2025-11-07 21:16:57 +00:00
feat: log when restoring from cache
This commit is contained in:
parent
048f4e7eae
commit
7b9fd1c127
1 changed files with 6 additions and 4 deletions
10
src/run.ts
10
src/run.ts
|
|
@ -1,5 +1,4 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
|
|
@ -26,7 +25,7 @@ export async function run() {
|
||||||
|
|
||||||
const downloadBaseURL = core.getInput('downloadBaseURL', {required: false})
|
const downloadBaseURL = core.getInput('downloadBaseURL', {required: false})
|
||||||
|
|
||||||
core.startGroup(`Downloading ${version}`)
|
core.startGroup(`Installing ${version}`)
|
||||||
const cachedPath = await downloadHelm(downloadBaseURL, version)
|
const cachedPath = await downloadHelm(downloadBaseURL, version)
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
||||||
|
|
@ -88,8 +87,11 @@ export async function downloadHelm(
|
||||||
version: string
|
version: string
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
let cachedToolpath = toolCache.find(helmToolName, version)
|
let cachedToolpath = toolCache.find(helmToolName, version)
|
||||||
if (!cachedToolpath) {
|
if (cachedToolpath) {
|
||||||
let helmDownloadPath
|
core.info(`Restoring '${version}' from cache`)
|
||||||
|
} else {
|
||||||
|
core.info(`Downloading '${version}' from '${baseURL}'`)
|
||||||
|
let helmDownloadPath;
|
||||||
try {
|
try {
|
||||||
helmDownloadPath = await toolCache.downloadTool(
|
helmDownloadPath = await toolCache.downloadTool(
|
||||||
getHelmDownloadURL(baseURL, version)
|
getHelmDownloadURL(baseURL, version)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue