mirror of
https://github.com/rharkor/caching-for-turbo.git
synced 2025-06-09 09:35:17 +09:00
fix: ci
This commit is contained in:
parent
eb287d233e
commit
dee28cf0df
3 changed files with 7 additions and 15 deletions
10
dist/index.js
generated
vendored
10
dist/index.js
generated
vendored
|
@ -122839,11 +122839,6 @@ function getCacheClient() {
|
|||
if (!env_1.env.valid) {
|
||||
throw new Error('Cache API env vars are not set');
|
||||
}
|
||||
const baseURL = `${env_1.env.ACTIONS_CACHE_URL.replace(/\/$/, '')}/_apis/artifactcache`;
|
||||
const headers = new Headers({
|
||||
Authorization: `Bearer ${env_1.env.ACTIONS_RUNTIME_TOKEN}`,
|
||||
Accept: 'application/json;api-version=6.0-preview.1'
|
||||
});
|
||||
const reserve = async (key, version) => {
|
||||
try {
|
||||
const reserveCacheResponse = await cacheHttpClient.reserveCache(key, [
|
||||
|
@ -122890,7 +122885,6 @@ function getCacheClient() {
|
|||
const query = async (keys, version) => {
|
||||
try {
|
||||
const queryCacheResponse = await cacheHttpClient.getCacheEntry([keys], [version]);
|
||||
core.info(`Cache result ${queryCacheResponse}`);
|
||||
if (queryCacheResponse?.archiveLocation) {
|
||||
return {
|
||||
success: true,
|
||||
|
@ -122901,7 +122895,9 @@ function getCacheClient() {
|
|||
};
|
||||
}
|
||||
else {
|
||||
return handleFetchError('Unable to query cache')(queryCacheResponse);
|
||||
return {
|
||||
success: false
|
||||
};
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue