Skip to content

Commit

Permalink
use highlevel actions cache api with key-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame committed Jul 5, 2023
1 parent 19f709f commit d8dfea6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.downloadFileFromActionsCache = void 0;
const cache = __importStar(__nccwpck_require__(7799));
const path_1 = __importDefault(__nccwpck_require__(1017));
const downloadFileFromActionsCache = (destFileName, cacheKey, cacheVersion) => cache.restoreCache([path_1.default.dirname(destFileName)], cacheKey);
const downloadFileFromActionsCache = (destFileName, cacheKey, cacheVersion) => cache.restoreCache([path_1.default.dirname(destFileName)], cacheKey, [
cacheKey
]);
exports.downloadFileFromActionsCache = downloadFileFromActionsCache;


Expand Down Expand Up @@ -1815,7 +1817,7 @@ class State {
this.reset();
const serialized = yield this.stateStorage.restore();
this.deserialize(serialized);
core.info(`state: rehydrated with info about ${this.processedIssuesIDs.size} issue(s)`);
core.info(`state: restored with info about ${this.processedIssuesIDs.size} issue(s)`);
});
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/classes/actions-cache-hilevel/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export const downloadFileFromActionsCache = (
cacheKey: string,
cacheVersion: string

Check warning on line 7 in src/classes/actions-cache-hilevel/download.ts

View workflow job for this annotation

GitHub Actions / Basic validation / build (windows-latest)

'cacheVersion' is defined but never used

Check warning on line 7 in src/classes/actions-cache-hilevel/download.ts

View workflow job for this annotation

GitHub Actions / Basic validation / build (macos-latest)

'cacheVersion' is defined but never used

Check warning on line 7 in src/classes/actions-cache-hilevel/download.ts

View workflow job for this annotation

GitHub Actions / Basic validation / build (ubuntu-latest)

'cacheVersion' is defined but never used
): Promise<void> =>
cache.restoreCache([path.dirname(destFileName)], cacheKey) as Promise<void>;
cache.restoreCache([path.dirname(destFileName)], cacheKey, [
cacheKey
]) as Promise<void>;
2 changes: 1 addition & 1 deletion src/classes/state/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class State implements IState {
const serialized = await this.stateStorage.restore();
this.deserialize(serialized);
core.info(
`state: rehydrated with info about ${this.processedIssuesIDs.size} issue(s)`
`state: restored with info about ${this.processedIssuesIDs.size} issue(s)`
);
}
}

0 comments on commit d8dfea6

Please sign in to comment.