mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-20 13:38:28 +02:00
Add no-cache option
This commit is contained in:
parent
8642d99a51
commit
01dacaa127
4 changed files with 22 additions and 14 deletions
|
@ -22,6 +22,7 @@ export type Input = {
|
|||
profile?: boolean;
|
||||
scope?: string;
|
||||
registryUrl?: string;
|
||||
disableCache?: boolean;
|
||||
};
|
||||
|
||||
export type Output = {
|
||||
|
@ -113,7 +114,10 @@ export default async (options: Input): Promise<Output> => {
|
|||
};
|
||||
|
||||
function isCacheEnabled(options: Input): boolean {
|
||||
const { customUrl, version } = options;
|
||||
const { customUrl, version, disableCache } = options;
|
||||
if (disableCache) {
|
||||
return false;
|
||||
}
|
||||
if (customUrl) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ runAction({
|
|||
customUrl: getInput("bun-download-url") || undefined,
|
||||
registryUrl: getInput("registry-url") || undefined,
|
||||
scope: getInput("scope") || undefined,
|
||||
disableCache: getInput("disable-cache") || undefined,
|
||||
})
|
||||
.then(({ version, revision, cacheHit }) => {
|
||||
setOutput("bun-version", version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue