This commit is contained in:
zoto_ff 2024-09-29 22:54:54 +03:00
parent a25a0f3a6e
commit a70f372af9
2 changed files with 4 additions and 8 deletions

View file

@ -74,9 +74,7 @@ export default async (options: Input): Promise<Output> => {
let revision: string | undefined; let revision: string | undefined;
let cacheHit = false; let cacheHit = false;
if (cacheEnabled) { if (cacheEnabled) {
const cacheKey = createHash('sha1') const cacheKey = createHash("sha1").update(url).digest("base64");
.update(url)
.digest('base64');
const cacheRestored = await restoreCache([bunPath], cacheKey); const cacheRestored = await restoreCache([bunPath], cacheKey);
if (cacheRestored) { if (cacheRestored) {

View file

@ -6,9 +6,7 @@ import { createHash } from "node:crypto";
(async () => { (async () => {
const state: CacheState = JSON.parse(getState("cache")); const state: CacheState = JSON.parse(getState("cache"));
if (state.cacheEnabled && !state.cacheHit) { if (state.cacheEnabled && !state.cacheHit) {
const cacheKey = createHash('sha1') const cacheKey = createHash("sha1").update(state.url).digest("base64");
.update(state.url)
.digest('base64');
try { try {
await saveCache([state.bunPath], cacheKey); await saveCache([state.bunPath], cacheKey);