mirror of https://github.com/actions/toolkit
removes duplicate extraction
parent
b719dac88b
commit
d78ac4e851
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "github-actions.warp-cache",
|
"name": "github-actions.warp-cache",
|
||||||
"version": "1.1.14",
|
"version": "1.1.15",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"description": "Github action to use WarpBuild's in-house cache offering",
|
"description": "Github action to use WarpBuild's in-house cache offering",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -123,7 +123,7 @@ export async function restoreCache(
|
||||||
)
|
)
|
||||||
core.debug(`Archive Path: ${archivePath}`)
|
core.debug(`Archive Path: ${archivePath}`)
|
||||||
|
|
||||||
let cacheKey: string = ''
|
let cacheKey = cacheEntry?.cache_entry?.cache_user_given_key ?? primaryKey
|
||||||
|
|
||||||
switch (cacheEntry.provider) {
|
switch (cacheEntry.provider) {
|
||||||
case 's3': {
|
case 's3': {
|
||||||
|
@ -131,8 +131,6 @@ export async function restoreCache(
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
cacheKey = cacheEntry.s3.pre_signed_url
|
|
||||||
|
|
||||||
if (options?.lookupOnly) {
|
if (options?.lookupOnly) {
|
||||||
core.info('Lookup only - skipping download')
|
core.info('Lookup only - skipping download')
|
||||||
return cacheKey
|
return cacheKey
|
||||||
|
@ -167,7 +165,6 @@ export async function restoreCache(
|
||||||
core.info('Cache Miss. Failed to download cache.')
|
core.info('Cache Miss. Failed to download cache.')
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (core.isDebug()) {
|
if (core.isDebug()) {
|
||||||
await listTar(archivePath, compressionMethod)
|
await listTar(archivePath, compressionMethod)
|
||||||
|
@ -181,6 +178,8 @@ export async function restoreCache(
|
||||||
)
|
)
|
||||||
|
|
||||||
await extractTar(archivePath, compressionMethod)
|
await extractTar(archivePath, compressionMethod)
|
||||||
|
}
|
||||||
|
|
||||||
core.info('Cache restored successfully')
|
core.info('Cache restored successfully')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -189,7 +188,6 @@ export async function restoreCache(
|
||||||
if (!cacheEntry.gcs?.cache_key) {
|
if (!cacheEntry.gcs?.cache_key) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
cacheKey = cacheEntry.gcs?.cache_key
|
|
||||||
|
|
||||||
if (options?.lookupOnly) {
|
if (options?.lookupOnly) {
|
||||||
core.info('Lookup only - skipping download')
|
core.info('Lookup only - skipping download')
|
||||||
|
@ -280,7 +278,7 @@ export async function restoreCache(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return cacheEntry?.cache_entry?.cache_user_given_key ?? cacheKey
|
return cacheKey
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const typedError = error as Error
|
const typedError = error as Error
|
||||||
if (typedError.name === ValidationError.name) {
|
if (typedError.name === ValidationError.name) {
|
||||||
|
|
Loading…
Reference in New Issue