( version: string )
| 30 | * @param version |
| 31 | */ |
| 32 | export async function restoreKindCache( |
| 33 | version: string |
| 34 | ): Promise<CacheParameters> { |
| 35 | const primaryKey = kindPrimaryKey(version); |
| 36 | const cachePaths = kindCachePaths(version); |
| 37 | |
| 38 | core.debug(`Primary key is ${primaryKey}`); |
| 39 | |
| 40 | const matchedKey = await cache.restoreCache(cachePaths, primaryKey); |
| 41 | |
| 42 | if (matchedKey) { |
| 43 | core.info(`Cache setup-kind restored from key: ${matchedKey}`); |
| 44 | } else { |
| 45 | core.info('Cache setup-kind is not found'); |
| 46 | } |
| 47 | return { |
| 48 | paths: cachePaths, |
| 49 | primaryKey: primaryKey, |
| 50 | }; |
| 51 | } |
| 52 | /** |
| 53 | * Defines the cache paths |
| 54 | * It is the folder where kind will be stored in the tool-cache |
nothing calls this directly
no test coverage detected