Use 'buildkit' as default scope (#516)

This PR updates the schema to use the correct default value for `scope`
in the GHA caching options. This should be effectively a no-op.


From: https://docs.docker.com/build/cache/backends/gha/

<img width="892" alt="image"
src="https://github.com/user-attachments/assets/690cde79-e30e-4085-81fd-1c9dc1c6d7e9"
/>


Closes #496
This commit is contained in:
Eron Wright
2025-04-09 14:01:21 -07:00
committed by GitHub
parent 706136a454
commit 780fe97f99
13 changed files with 28 additions and 53 deletions

View File

@@ -136,7 +136,7 @@ export interface CacheFromGitHubActionsArgs {
export function cacheFromGitHubActionsArgsProvideDefaults(val: CacheFromGitHubActionsArgs): CacheFromGitHubActionsArgs {
return {
...val,
scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""),
scope: (val.scope) ?? "buildkit",
token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""),
url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""),
};
@@ -345,7 +345,7 @@ export function cacheToGitHubActionsArgsProvideDefaults(val: CacheToGitHubAction
...val,
ignoreError: (val.ignoreError) ?? false,
mode: (val.mode) ?? "min",
scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""),
scope: (val.scope) ?? "buildkit",
token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""),
url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""),
};

View File

@@ -136,7 +136,7 @@ export interface CacheFromGitHubActions {
export function cacheFromGitHubActionsProvideDefaults(val: CacheFromGitHubActions): CacheFromGitHubActions {
return {
...val,
scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""),
scope: (val.scope) ?? "buildkit",
token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""),
url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""),
};
@@ -345,7 +345,7 @@ export function cacheToGitHubActionsProvideDefaults(val: CacheToGitHubActions):
...val,
ignoreError: (val.ignoreError) ?? false,
mode: (val.mode) ?? "min",
scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""),
scope: (val.scope) ?? "buildkit",
token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""),
url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""),
};