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

@@ -862,10 +862,8 @@ func (val *CacheFromGitHubActions) Defaults() *CacheFromGitHubActions {
}
tmp := *val
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
scope_ := d.(string)
tmp.Scope = &scope_
}
scope_ := "buildkit"
tmp.Scope = &scope_
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {
@@ -921,9 +919,7 @@ func (val *CacheFromGitHubActionsArgs) Defaults() *CacheFromGitHubActionsArgs {
}
tmp := *val
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
tmp.Scope = pulumi.StringPtr(d.(string))
}
tmp.Scope = pulumi.StringPtr("buildkit")
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {
@@ -2405,10 +2401,8 @@ func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions {
tmp.Mode = &mode_
}
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
scope_ := d.(string)
tmp.Scope = &scope_
}
scope_ := "buildkit"
tmp.Scope = &scope_
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {
@@ -2474,9 +2468,7 @@ func (val *CacheToGitHubActionsArgs) Defaults() *CacheToGitHubActionsArgs {
tmp.Mode = CacheMode("min")
}
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
tmp.Scope = pulumi.StringPtr(d.(string))
}
tmp.Scope = pulumi.StringPtr("buildkit")
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {

View File

@@ -421,10 +421,8 @@ func (val *CacheFromGitHubActions) Defaults() *CacheFromGitHubActions {
}
tmp := *val
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
scope_ := d.(string)
tmp.Scope = &scope_
}
scope_ := "buildkit"
tmp.Scope = &scope_
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {
@@ -469,9 +467,7 @@ func (val *CacheFromGitHubActionsArgs) Defaults() *CacheFromGitHubActionsArgs {
}
tmp := *val
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
tmp.Scope = pulumix.Ptr(d.(string))
}
tmp.Scope = pulumix.Ptr("buildkit")
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {
@@ -1178,10 +1174,8 @@ func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions {
tmp.Mode = &mode_
}
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
scope_ := d.(string)
tmp.Scope = &scope_
}
scope_ := "buildkit"
tmp.Scope = &scope_
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {
@@ -1236,9 +1230,7 @@ func (val *CacheToGitHubActionsArgs) Defaults() *CacheToGitHubActionsArgs {
tmp.Mode = pulumix.Ptr(CacheMode("min"))
}
if tmp.Scope == nil {
if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil {
tmp.Scope = pulumix.Ptr(d.(string))
}
tmp.Scope = pulumix.Ptr("buildkit")
}
if tmp.Token == nil {
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil {