mirror of
https://github.com/oven-sh/setup-bun.git
synced 2026-05-20 07:10:13 +02:00
feat: add bun- prefix to cache keys (#160)
* feat: add bun- prefix to cache keys Extract cache key generation into a shared `getCacheKey` function in utils.ts that both action.ts and cache-save.ts import. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * [autofix.ci] apply automated fixes --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { debug, warning } from "@actions/core";
|
||||
import { info } from "node:console";
|
||||
import { createHash } from "node:crypto";
|
||||
import { existsSync, readFileSync, renameSync } from "node:fs";
|
||||
import { resolve, basename } from "node:path";
|
||||
|
||||
export function getCacheKey(url: string): string {
|
||||
return `bun-${createHash("sha1").update(url).digest("base64")}`;
|
||||
}
|
||||
|
||||
export async function request(
|
||||
url: string,
|
||||
init?: RequestInit,
|
||||
|
||||
Reference in New Issue
Block a user