Fix GitHub action URL (#80)
Our docs and default value for the GitHub action cache URL were referring to the [wrong](https://github.com/tonistiigi/go-actions-cache/blob/master/api.md) environment variable. I was under the impression that the underlying library ends up checking for the correct variable later so this would be only cosmetic, but a user [confirmed](https://github.com/pulumi/pulumi-docker-build/issues/77#issuecomment-2135621983) this does appear to break things. I brought over an old test I had written while this was still in the pulumi-docker repo, but unfortunately it doesn't currently test GHA due to ci-mgmt limitations https://github.com/pulumi/pulumi-docker-build/issues/82. Fixes https://github.com/pulumi/pulumi-docker-build/issues/77.
This commit is contained in:
20
sdk/go/dockerbuild/x/pulumiTypes.go
generated
20
sdk/go/dockerbuild/x/pulumiTypes.go
generated
@@ -408,7 +408,7 @@ type CacheFromGitHubActions struct {
|
||||
Token *string `pulumi:"token"`
|
||||
// The cache server URL to use for artifacts.
|
||||
//
|
||||
// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
|
||||
// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
|
||||
// `crazy-max/ghaction-github-runtime` is recommended to expose this
|
||||
// environment variable to your jobs.
|
||||
Url *string `pulumi:"url"`
|
||||
@@ -433,7 +433,7 @@ func (val *CacheFromGitHubActions) Defaults() *CacheFromGitHubActions {
|
||||
}
|
||||
}
|
||||
if tmp.Url == nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil {
|
||||
url_ := d.(string)
|
||||
tmp.Url = &url_
|
||||
}
|
||||
@@ -456,7 +456,7 @@ type CacheFromGitHubActionsArgs struct {
|
||||
Token pulumix.Input[*string] `pulumi:"token"`
|
||||
// The cache server URL to use for artifacts.
|
||||
//
|
||||
// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
|
||||
// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
|
||||
// `crazy-max/ghaction-github-runtime` is recommended to expose this
|
||||
// environment variable to your jobs.
|
||||
Url pulumix.Input[*string] `pulumi:"url"`
|
||||
@@ -479,7 +479,7 @@ func (val *CacheFromGitHubActionsArgs) Defaults() *CacheFromGitHubActionsArgs {
|
||||
}
|
||||
}
|
||||
if tmp.Url == nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil {
|
||||
tmp.Url = pulumix.Ptr(d.(string))
|
||||
}
|
||||
}
|
||||
@@ -541,7 +541,7 @@ func (o CacheFromGitHubActionsOutput) Token() pulumix.Output[*string] {
|
||||
|
||||
// The cache server URL to use for artifacts.
|
||||
//
|
||||
// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
|
||||
// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
|
||||
// `crazy-max/ghaction-github-runtime` is recommended to expose this
|
||||
// environment variable to your jobs.
|
||||
func (o CacheFromGitHubActionsOutput) Url() pulumix.Output[*string] {
|
||||
@@ -1157,7 +1157,7 @@ type CacheToGitHubActions struct {
|
||||
Token *string `pulumi:"token"`
|
||||
// The cache server URL to use for artifacts.
|
||||
//
|
||||
// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
|
||||
// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
|
||||
// `crazy-max/ghaction-github-runtime` is recommended to expose this
|
||||
// environment variable to your jobs.
|
||||
Url *string `pulumi:"url"`
|
||||
@@ -1190,7 +1190,7 @@ func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions {
|
||||
}
|
||||
}
|
||||
if tmp.Url == nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil {
|
||||
url_ := d.(string)
|
||||
tmp.Url = &url_
|
||||
}
|
||||
@@ -1217,7 +1217,7 @@ type CacheToGitHubActionsArgs struct {
|
||||
Token pulumix.Input[*string] `pulumi:"token"`
|
||||
// The cache server URL to use for artifacts.
|
||||
//
|
||||
// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
|
||||
// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
|
||||
// `crazy-max/ghaction-github-runtime` is recommended to expose this
|
||||
// environment variable to your jobs.
|
||||
Url pulumix.Input[*string] `pulumi:"url"`
|
||||
@@ -1246,7 +1246,7 @@ func (val *CacheToGitHubActionsArgs) Defaults() *CacheToGitHubActionsArgs {
|
||||
}
|
||||
}
|
||||
if tmp.Url == nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil {
|
||||
tmp.Url = pulumix.Ptr(d.(string))
|
||||
}
|
||||
}
|
||||
@@ -1318,7 +1318,7 @@ func (o CacheToGitHubActionsOutput) Token() pulumix.Output[*string] {
|
||||
|
||||
// The cache server URL to use for artifacts.
|
||||
//
|
||||
// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
|
||||
// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
|
||||
// `crazy-max/ghaction-github-runtime` is recommended to expose this
|
||||
// environment variable to your jobs.
|
||||
func (o CacheToGitHubActionsOutput) Url() pulumix.Output[*string] {
|
||||
|
||||
Reference in New Issue
Block a user