From 38e65a3f81de23d43d703920968aba2c49e674b1 Mon Sep 17 00:00:00 2001 From: Alberto Pose Date: Fri, 17 Oct 2025 11:00:40 +0100 Subject: [PATCH] Remove URL and Token arguments from CacheFromGitHubActions. (#626) Fixes #75 Arguments URL and Token have been removed but `$ACTIONS_CACHE_URL` and `$ACTIONS_RUNTIME_TOKEN` env variables could be injected if desired. --------- Co-authored-by: Bryce Lampe --- .github/workflows/run-acceptance-tests.yml | 2 + CHANGELOG.md | 4 + .../pulumi-resource-docker-build/schema.json | 44 +--- provider/internal/cache.go | 37 ++- provider/internal/cache_test.go | 46 +++- provider/internal/image_test.go | 16 +- .../Inputs/CacheFromGitHubActionsArgs.cs | 39 +--- sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs | 39 +--- sdk/dotnet/Outputs/CacheFromGitHubActions.cs | 32 +-- sdk/dotnet/Outputs/CacheToGitHubActions.cs | 31 +-- sdk/go/dockerbuild/pulumiTypes.go | 216 ++---------------- sdk/go/dockerbuild/x/pulumiTypes.go | 158 ++----------- .../inputs/CacheFromGitHubActionsArgs.java | 119 +--------- .../inputs/CacheToGitHubActionsArgs.java | 119 +--------- .../outputs/CacheFromGitHubActions.java | 60 ----- .../outputs/CacheToGitHubActions.java | 60 ----- sdk/nodejs/types/input.ts | 50 +--- sdk/nodejs/types/output.ts | 50 +--- sdk/python/pulumi_docker_build/_inputs.py | 166 ++------------ sdk/python/pulumi_docker_build/outputs.py | 116 ++-------- 20 files changed, 227 insertions(+), 1177 deletions(-) diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 9a20a03..41430f3 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -64,6 +64,8 @@ jobs: id-token: write # For ESC secrets. pull-requests: write # For schema check comment. steps: + - name: Expose GitHub Runtime + uses: crazy-max/ghaction-github-runtime@v3 - name: Checkout Repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index fee47ce..8b0cfb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Unreleased +## Changed + +- Arguments `CacheFromGitHubActions.URL` and `CacheFromGitHubActions.Token` have been removed. If the previous behaviour is desired, set the `ACTIONS_CACHE_URL` and `ACTIONS_RUNTIME_TOKEN` environment variables. (https://github.com/pulumi/pulumi-docker-build/issues/75) + ## 0.0.14 (2025-09-30) ### Fixed diff --git a/provider/cmd/pulumi-resource-docker-build/schema.json b/provider/cmd/pulumi-resource-docker-build/schema.json index 8341918..b239c44 100644 --- a/provider/cmd/pulumi-resource-docker-build/schema.json +++ b/provider/cmd/pulumi-resource-docker-build/schema.json @@ -155,32 +155,12 @@ ] }, "docker-build:index:CacheFromGitHubActions": { + "description": "Recommended for use with GitHub Actions workflows.\n\nAn action like `crazy-max/ghaction-github-runtime` is recommended to expose\nappropriate credentials to your GitHub workflow.", "properties": { "scope": { "type": "string", "description": "The scope to use for cache keys. Defaults to `buildkit`.\n\nThis should be set if building and caching multiple images in one\nworkflow, otherwise caches will overwrite each other.", "default": "buildkit" - }, - "token": { - "type": "string", - "description": "The GitHub Actions token to use. This is not a personal access tokens\nand is typically generated automatically as part of each job.\n\nDefaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", - "default": "", - "defaultInfo": { - "environment": [ - "ACTIONS_RUNTIME_TOKEN" - ] - }, - "secret": true - }, - "url": { - "type": "string", - "description": "The cache server URL to use for artifacts.\n\nDefaults to `$ACTIONS_CACHE_URL`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", - "default": "", - "defaultInfo": { - "environment": [ - "ACTIONS_CACHE_URL" - ] - } } }, "type": "object" @@ -370,6 +350,7 @@ ] }, "docker-build:index:CacheToGitHubActions": { + "description": "Recommended for use with GitHub Actions workflows.\n\nAn action like `crazy-max/ghaction-github-runtime` is recommended to expose\nappropriate credentials to your GitHub workflow.", "properties": { "ignoreError": { "type": "boolean", @@ -385,27 +366,6 @@ "type": "string", "description": "The scope to use for cache keys. Defaults to `buildkit`.\n\nThis should be set if building and caching multiple images in one\nworkflow, otherwise caches will overwrite each other.", "default": "buildkit" - }, - "token": { - "type": "string", - "description": "The GitHub Actions token to use. This is not a personal access tokens\nand is typically generated automatically as part of each job.\n\nDefaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", - "default": "", - "defaultInfo": { - "environment": [ - "ACTIONS_RUNTIME_TOKEN" - ] - }, - "secret": true - }, - "url": { - "type": "string", - "description": "The cache server URL to use for artifacts.\n\nDefaults to `$ACTIONS_CACHE_URL`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", - "default": "", - "defaultInfo": { - "environment": [ - "ACTIONS_CACHE_URL" - ] - } } }, "type": "object" diff --git a/provider/internal/cache.go b/provider/internal/cache.go index 5d0ab70..05e939c 100644 --- a/provider/internal/cache.go +++ b/provider/internal/cache.go @@ -17,6 +17,7 @@ package internal import ( "errors" "fmt" + "os" "strings" controllerapi "github.com/docker/buildx/controller/pb" @@ -148,33 +149,20 @@ func (c CacheWithOCI) String() string { // CacheFromGitHubActions pulls cache manifests from the GitHub actions cache. type CacheFromGitHubActions struct { - URL string `pulumi:"url,optional"` - Token string `pulumi:"token,optional" provider:"secret"` Scope string `pulumi:"scope,optional"` } // Annotate sets docstrings on CacheFromGitHubActions. func (c *CacheFromGitHubActions) Annotate(a infer.Annotator) { - a.SetDefault(&c.URL, "", "ACTIONS_CACHE_URL") - a.SetDefault(&c.Token, "", "ACTIONS_RUNTIME_TOKEN") + a.Describe(&c, dedent(` + Recommended for use with GitHub Actions workflows. + + An action like "crazy-max/ghaction-github-runtime" is recommended to expose + appropriate credentials to your GitHub workflow. + `)) + a.SetDefault(&c.Scope, "buildkit") - a.Describe(&c.URL, dedent(` - The cache server URL to use for artifacts. - - 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. - `)) - a.Describe(&c.Token, dedent(` - The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to "$ACTIONS_RUNTIME_TOKEN", although a separate action like - "crazy-max/ghaction-github-runtime" is recommended to expose this - environment variable to your jobs. - - `)) a.Describe(&c.Scope, dedent(` The scope to use for cache keys. Defaults to "buildkit". @@ -191,11 +179,12 @@ func (c *CacheFromGitHubActions) String() string { if c.Scope != "" { parts = append(parts, "scope="+c.Scope) } - if c.Token != "" { - parts = append(parts, "token="+c.Token) + // Preserving backwards compatibility with the old behaviour. + if token := os.Getenv("ACTIONS_RUNTIME_TOKEN"); token != "" { + parts = append(parts, "token="+token) } - if c.URL != "" { - parts = append(parts, "url="+c.URL) + if url := os.Getenv("ACTIONS_CACHE_URL"); url != "" { + parts = append(parts, "url="+url) } return strings.Join(parts, ",") } diff --git a/provider/internal/cache_test.go b/provider/internal/cache_test.go index 3fda1bb..f3c86d7 100644 --- a/provider/internal/cache_test.go +++ b/provider/internal/cache_test.go @@ -24,14 +24,15 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) +//nolint:paralleltest // We don't call t.Parallel here to prevent environment corruption. func TestCacheString(t *testing.T) { - t.Parallel() gzip := Gzip tests := []struct { - name string - given fmt.Stringer - want string + name string + arrange func(t *testing.T) + given fmt.Stringer + want string }{ { name: "s3", @@ -55,7 +56,37 @@ func TestCacheString(t *testing.T) { { name: "gha", given: CacheTo{GHA: &CacheToGitHubActions{}}, - want: "type=gha", + arrange: func(t *testing.T) { + t.Setenv("ACTIONS_CACHE_URL", "") + t.Setenv("ACTIONS_RUNTIME_TOKEN", "") + }, + want: "type=gha", + }, + { + name: "gha-default-envs", + arrange: func(t *testing.T) { + t.Setenv("ACTIONS_CACHE_URL", "https://example.com") + t.Setenv("ACTIONS_RUNTIME_TOKEN", "token") + }, + given: CacheTo{GHA: &CacheToGitHubActions{ + CacheFromGitHubActions: CacheFromGitHubActions{ + Scope: "scope", + }, + }}, + want: "type=gha,scope=scope,token=token,url=https://example.com", + }, + { + name: "gha-with-scope", + arrange: func(t *testing.T) { + t.Setenv("ACTIONS_CACHE_URL", "") + t.Setenv("ACTIONS_RUNTIME_TOKEN", "") + }, + given: CacheTo{GHA: &CacheToGitHubActions{ + CacheFromGitHubActions: CacheFromGitHubActions{ + Scope: "scope", + }, + }}, + want: "type=gha,scope=scope", }, { name: "from-local", @@ -121,9 +152,12 @@ func TestCacheString(t *testing.T) { }, } + //nolint:paralleltest // We don't call t.Parallel here to prevent environment corruption. for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - t.Parallel() + if tt.arrange != nil { + tt.arrange(t) + } actual := tt.given.String() assert.Equal(t, tt.want, actual) diff --git a/provider/internal/image_test.go b/provider/internal/image_test.go index defe144..59395c0 100644 --- a/provider/internal/image_test.go +++ b/provider/internal/image_test.go @@ -917,8 +917,10 @@ func TestValidateImageArgs(t *testing.T) { { name: "gha environment", envs: map[string]string{ - "ACTIONS_CACHE_URL": "test-cache-url", - "ACTIONS_RUNTIME_TOKEN": "test-runtime-token", + "ACTIONS_CACHE_URL": "test-cache-url", + "ACTIONS_RUNTIME_TOKEN": "test-runtime-token", + "ACTIONS_RESULTS_URL": "test-results-url", + "ACTIONS_CACHE_SERVICE_V2": "true", }, args: ImageArgs{ Context: &BuildContext{Context: Context{Location: "testdata/noop"}}, @@ -930,15 +932,17 @@ func TestValidateImageArgs(t *testing.T) { wantCacheFrom: &pb.CacheOptionsEntry{ Type: "gha", Attrs: map[string]string{ - "token": "test-runtime-token", - "url": "test-cache-url", + "token": "test-runtime-token", + "url": "test-cache-url", + "url_v2": "test-results-url", }, }, wantCacheTo: &pb.CacheOptionsEntry{ Type: "gha", Attrs: map[string]string{ - "token": "test-runtime-token", - "url": "test-cache-url", + "token": "test-runtime-token", + "url": "test-cache-url", + "url_v2": "test-results-url", }, }, }, diff --git a/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs b/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs index dcff35c..e49acbf 100644 --- a/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs +++ b/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs @@ -10,6 +10,12 @@ using Pulumi.Serialization; namespace Pulumi.DockerBuild.Inputs { + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to expose + /// appropriate credentials to your GitHub workflow. + /// public sealed class CacheFromGitHubActionsArgs : global::Pulumi.ResourceArgs { /// @@ -21,42 +27,9 @@ namespace Pulumi.DockerBuild.Inputs [Input("scope")] public Input? Scope { get; set; } - [Input("token")] - private Input? _token; - - /// - /// The GitHub Actions token to use. This is not a personal access tokens - /// and is typically generated automatically as part of each job. - /// - /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - /// `crazy-max/ghaction-github-runtime` is recommended to expose this - /// environment variable to your jobs. - /// - public Input? Token - { - get => _token; - set - { - var emptySecret = Output.CreateSecret(0); - _token = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); - } - } - - /// - /// The cache server URL to use for artifacts. - /// - /// 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. - /// - [Input("url")] - public Input? Url { get; set; } - public CacheFromGitHubActionsArgs() { Scope = "buildkit"; - Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? ""; - Url = Utilities.GetEnv("ACTIONS_CACHE_URL") ?? ""; } public static new CacheFromGitHubActionsArgs Empty => new CacheFromGitHubActionsArgs(); } diff --git a/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs b/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs index 25bf605..e530974 100644 --- a/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs +++ b/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs @@ -10,6 +10,12 @@ using Pulumi.Serialization; namespace Pulumi.DockerBuild.Inputs { + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to expose + /// appropriate credentials to your GitHub workflow. + /// public sealed class CacheToGitHubActionsArgs : global::Pulumi.ResourceArgs { /// @@ -33,44 +39,11 @@ namespace Pulumi.DockerBuild.Inputs [Input("scope")] public Input? Scope { get; set; } - [Input("token")] - private Input? _token; - - /// - /// The GitHub Actions token to use. This is not a personal access tokens - /// and is typically generated automatically as part of each job. - /// - /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - /// `crazy-max/ghaction-github-runtime` is recommended to expose this - /// environment variable to your jobs. - /// - public Input? Token - { - get => _token; - set - { - var emptySecret = Output.CreateSecret(0); - _token = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); - } - } - - /// - /// The cache server URL to use for artifacts. - /// - /// 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. - /// - [Input("url")] - public Input? Url { get; set; } - public CacheToGitHubActionsArgs() { IgnoreError = false; Mode = Pulumi.DockerBuild.CacheMode.Min; Scope = "buildkit"; - Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? ""; - Url = Utilities.GetEnv("ACTIONS_CACHE_URL") ?? ""; } public static new CacheToGitHubActionsArgs Empty => new CacheToGitHubActionsArgs(); } diff --git a/sdk/dotnet/Outputs/CacheFromGitHubActions.cs b/sdk/dotnet/Outputs/CacheFromGitHubActions.cs index f91001d..e24169d 100644 --- a/sdk/dotnet/Outputs/CacheFromGitHubActions.cs +++ b/sdk/dotnet/Outputs/CacheFromGitHubActions.cs @@ -10,6 +10,12 @@ using Pulumi.Serialization; namespace Pulumi.DockerBuild.Outputs { + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to expose + /// appropriate credentials to your GitHub workflow. + /// [OutputType] public sealed class CacheFromGitHubActions { @@ -20,35 +26,11 @@ namespace Pulumi.DockerBuild.Outputs /// workflow, otherwise caches will overwrite each other. /// public readonly string? Scope; - /// - /// The GitHub Actions token to use. This is not a personal access tokens - /// and is typically generated automatically as part of each job. - /// - /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - /// `crazy-max/ghaction-github-runtime` is recommended to expose this - /// environment variable to your jobs. - /// - public readonly string? Token; - /// - /// The cache server URL to use for artifacts. - /// - /// 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. - /// - public readonly string? Url; [OutputConstructor] - private CacheFromGitHubActions( - string? scope, - - string? token, - - string? url) + private CacheFromGitHubActions(string? scope) { Scope = scope; - Token = token; - Url = url; } } } diff --git a/sdk/dotnet/Outputs/CacheToGitHubActions.cs b/sdk/dotnet/Outputs/CacheToGitHubActions.cs index 5d0cd99..aef54b9 100644 --- a/sdk/dotnet/Outputs/CacheToGitHubActions.cs +++ b/sdk/dotnet/Outputs/CacheToGitHubActions.cs @@ -10,6 +10,12 @@ using Pulumi.Serialization; namespace Pulumi.DockerBuild.Outputs { + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to expose + /// appropriate credentials to your GitHub workflow. + /// [OutputType] public sealed class CacheToGitHubActions { @@ -28,23 +34,6 @@ namespace Pulumi.DockerBuild.Outputs /// workflow, otherwise caches will overwrite each other. /// public readonly string? Scope; - /// - /// The GitHub Actions token to use. This is not a personal access tokens - /// and is typically generated automatically as part of each job. - /// - /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - /// `crazy-max/ghaction-github-runtime` is recommended to expose this - /// environment variable to your jobs. - /// - public readonly string? Token; - /// - /// The cache server URL to use for artifacts. - /// - /// 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. - /// - public readonly string? Url; [OutputConstructor] private CacheToGitHubActions( @@ -52,17 +41,11 @@ namespace Pulumi.DockerBuild.Outputs Pulumi.DockerBuild.CacheMode? mode, - string? scope, - - string? token, - - string? url) + string? scope) { IgnoreError = ignoreError; Mode = mode; Scope = scope; - Token = token; - Url = url; } } } diff --git a/sdk/go/dockerbuild/pulumiTypes.go b/sdk/go/dockerbuild/pulumiTypes.go index df40629..b31c3ab 100644 --- a/sdk/go/dockerbuild/pulumiTypes.go +++ b/sdk/go/dockerbuild/pulumiTypes.go @@ -834,25 +834,16 @@ func (o CacheFromAzureBlobPtrOutput) SecretAccessKey() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheFromGitHubActions struct { // The scope to use for cache keys. Defaults to `buildkit`. // // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope *string `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token *string `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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"` } // Defaults sets the appropriate defaults for CacheFromGitHubActions @@ -865,18 +856,6 @@ func (val *CacheFromGitHubActions) Defaults() *CacheFromGitHubActions { scope_ := "buildkit" tmp.Scope = &scope_ } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - token_ := d.(string) - tmp.Token = &token_ - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - url_ := d.(string) - tmp.Url = &url_ - } - } return &tmp } @@ -891,25 +870,16 @@ type CacheFromGitHubActionsInput interface { ToCacheFromGitHubActionsOutputWithContext(context.Context) CacheFromGitHubActionsOutput } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheFromGitHubActionsArgs struct { // The scope to use for cache keys. Defaults to `buildkit`. // // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope pulumi.StringPtrInput `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token pulumi.StringPtrInput `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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 pulumi.StringPtrInput `pulumi:"url"` } // Defaults sets the appropriate defaults for CacheFromGitHubActionsArgs @@ -921,16 +891,6 @@ func (val *CacheFromGitHubActionsArgs) Defaults() *CacheFromGitHubActionsArgs { if tmp.Scope == nil { tmp.Scope = pulumi.StringPtr("buildkit") } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - tmp.Token = pulumi.StringPtr(d.(string)) - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - tmp.Url = pulumi.StringPtr(d.(string)) - } - } return &tmp } func (CacheFromGitHubActionsArgs) ElementType() reflect.Type { @@ -998,6 +958,10 @@ func (i *cacheFromGitHubActionsPtrType) ToOutput(ctx context.Context) pulumix.Ou } } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheFromGitHubActionsOutput struct{ *pulumi.OutputState } func (CacheFromGitHubActionsOutput) ElementType() reflect.Type { @@ -1036,25 +1000,6 @@ func (o CacheFromGitHubActionsOutput) Scope() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheFromGitHubActions) *string { return v.Scope }).(pulumi.StringPtrOutput) } -// The GitHub Actions token to use. This is not a personal access tokens -// and is typically generated automatically as part of each job. -// -// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like -// `crazy-max/ghaction-github-runtime` is recommended to expose this -// environment variable to your jobs. -func (o CacheFromGitHubActionsOutput) Token() pulumi.StringPtrOutput { - return o.ApplyT(func(v CacheFromGitHubActions) *string { return v.Token }).(pulumi.StringPtrOutput) -} - -// The cache server URL to use for artifacts. -// -// 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() pulumi.StringPtrOutput { - return o.ApplyT(func(v CacheFromGitHubActions) *string { return v.Url }).(pulumi.StringPtrOutput) -} - type CacheFromGitHubActionsPtrOutput struct{ *pulumi.OutputState } func (CacheFromGitHubActionsPtrOutput) ElementType() reflect.Type { @@ -1098,35 +1043,6 @@ func (o CacheFromGitHubActionsPtrOutput) Scope() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -// The GitHub Actions token to use. This is not a personal access tokens -// and is typically generated automatically as part of each job. -// -// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like -// `crazy-max/ghaction-github-runtime` is recommended to expose this -// environment variable to your jobs. -func (o CacheFromGitHubActionsPtrOutput) Token() pulumi.StringPtrOutput { - return o.ApplyT(func(v *CacheFromGitHubActions) *string { - if v == nil { - return nil - } - return v.Token - }).(pulumi.StringPtrOutput) -} - -// The cache server URL to use for artifacts. -// -// 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 CacheFromGitHubActionsPtrOutput) Url() pulumi.StringPtrOutput { - return o.ApplyT(func(v *CacheFromGitHubActions) *string { - if v == nil { - return nil - } - return v.Url - }).(pulumi.StringPtrOutput) -} - type CacheFromLocal struct { // Digest of manifest to import. Digest *string `pulumi:"digest"` @@ -2361,6 +2277,10 @@ func (o CacheToAzureBlobPtrOutput) SecretAccessKey() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheToGitHubActions struct { // Ignore errors caused by failed cache exports. IgnoreError *bool `pulumi:"ignoreError"` @@ -2371,19 +2291,6 @@ type CacheToGitHubActions struct { // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope *string `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token *string `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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"` } // Defaults sets the appropriate defaults for CacheToGitHubActions @@ -2404,18 +2311,6 @@ func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions { scope_ := "buildkit" tmp.Scope = &scope_ } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - token_ := d.(string) - tmp.Token = &token_ - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - url_ := d.(string) - tmp.Url = &url_ - } - } return &tmp } @@ -2430,6 +2325,10 @@ type CacheToGitHubActionsInput interface { ToCacheToGitHubActionsOutputWithContext(context.Context) CacheToGitHubActionsOutput } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheToGitHubActionsArgs struct { // Ignore errors caused by failed cache exports. IgnoreError pulumi.BoolPtrInput `pulumi:"ignoreError"` @@ -2440,19 +2339,6 @@ type CacheToGitHubActionsArgs struct { // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope pulumi.StringPtrInput `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token pulumi.StringPtrInput `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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 pulumi.StringPtrInput `pulumi:"url"` } // Defaults sets the appropriate defaults for CacheToGitHubActionsArgs @@ -2470,16 +2356,6 @@ func (val *CacheToGitHubActionsArgs) Defaults() *CacheToGitHubActionsArgs { if tmp.Scope == nil { tmp.Scope = pulumi.StringPtr("buildkit") } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - tmp.Token = pulumi.StringPtr(d.(string)) - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - tmp.Url = pulumi.StringPtr(d.(string)) - } - } return &tmp } func (CacheToGitHubActionsArgs) ElementType() reflect.Type { @@ -2547,6 +2423,10 @@ func (i *cacheToGitHubActionsPtrType) ToOutput(ctx context.Context) pulumix.Outp } } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheToGitHubActionsOutput struct{ *pulumi.OutputState } func (CacheToGitHubActionsOutput) ElementType() reflect.Type { @@ -2595,25 +2475,6 @@ func (o CacheToGitHubActionsOutput) Scope() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheToGitHubActions) *string { return v.Scope }).(pulumi.StringPtrOutput) } -// The GitHub Actions token to use. This is not a personal access tokens -// and is typically generated automatically as part of each job. -// -// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like -// `crazy-max/ghaction-github-runtime` is recommended to expose this -// environment variable to your jobs. -func (o CacheToGitHubActionsOutput) Token() pulumi.StringPtrOutput { - return o.ApplyT(func(v CacheToGitHubActions) *string { return v.Token }).(pulumi.StringPtrOutput) -} - -// The cache server URL to use for artifacts. -// -// 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() pulumi.StringPtrOutput { - return o.ApplyT(func(v CacheToGitHubActions) *string { return v.Url }).(pulumi.StringPtrOutput) -} - type CacheToGitHubActionsPtrOutput struct{ *pulumi.OutputState } func (CacheToGitHubActionsPtrOutput) ElementType() reflect.Type { @@ -2677,35 +2538,6 @@ func (o CacheToGitHubActionsPtrOutput) Scope() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -// The GitHub Actions token to use. This is not a personal access tokens -// and is typically generated automatically as part of each job. -// -// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like -// `crazy-max/ghaction-github-runtime` is recommended to expose this -// environment variable to your jobs. -func (o CacheToGitHubActionsPtrOutput) Token() pulumi.StringPtrOutput { - return o.ApplyT(func(v *CacheToGitHubActions) *string { - if v == nil { - return nil - } - return v.Token - }).(pulumi.StringPtrOutput) -} - -// The cache server URL to use for artifacts. -// -// 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 CacheToGitHubActionsPtrOutput) Url() pulumi.StringPtrOutput { - return o.ApplyT(func(v *CacheToGitHubActions) *string { - if v == nil { - return nil - } - return v.Url - }).(pulumi.StringPtrOutput) -} - // Include an inline cache with the exported image. type CacheToInline struct { } diff --git a/sdk/go/dockerbuild/x/pulumiTypes.go b/sdk/go/dockerbuild/x/pulumiTypes.go index 9ca3a2a..d2e40b5 100644 --- a/sdk/go/dockerbuild/x/pulumiTypes.go +++ b/sdk/go/dockerbuild/x/pulumiTypes.go @@ -393,25 +393,16 @@ func (o CacheFromAzureBlobOutput) SecretAccessKey() pulumix.Output[*string] { return pulumix.Apply[CacheFromAzureBlob](o, func(v CacheFromAzureBlob) *string { return v.SecretAccessKey }) } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheFromGitHubActions struct { // The scope to use for cache keys. Defaults to `buildkit`. // // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope *string `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token *string `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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"` } // Defaults sets the appropriate defaults for CacheFromGitHubActions @@ -424,40 +415,19 @@ func (val *CacheFromGitHubActions) Defaults() *CacheFromGitHubActions { scope_ := "buildkit" tmp.Scope = &scope_ } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - token_ := d.(string) - tmp.Token = &token_ - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - url_ := d.(string) - tmp.Url = &url_ - } - } return &tmp } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheFromGitHubActionsArgs struct { // The scope to use for cache keys. Defaults to `buildkit`. // // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope pulumix.Input[*string] `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token pulumix.Input[*string] `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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"` } // Defaults sets the appropriate defaults for CacheFromGitHubActionsArgs @@ -469,16 +439,6 @@ func (val *CacheFromGitHubActionsArgs) Defaults() *CacheFromGitHubActionsArgs { if tmp.Scope == nil { tmp.Scope = pulumix.Ptr("buildkit") } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - tmp.Token = pulumix.Ptr(d.(string)) - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - tmp.Url = pulumix.Ptr(d.(string)) - } - } return &tmp } func (CacheFromGitHubActionsArgs) ElementType() reflect.Type { @@ -497,6 +457,10 @@ func (i *CacheFromGitHubActionsArgs) ToOutput(ctx context.Context) pulumix.Outpu return pulumix.Val(i) } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheFromGitHubActionsOutput struct{ *pulumi.OutputState } func (CacheFromGitHubActionsOutput) ElementType() reflect.Type { @@ -525,25 +489,6 @@ func (o CacheFromGitHubActionsOutput) Scope() pulumix.Output[*string] { return pulumix.Apply[CacheFromGitHubActions](o, func(v CacheFromGitHubActions) *string { return v.Scope }) } -// The GitHub Actions token to use. This is not a personal access tokens -// and is typically generated automatically as part of each job. -// -// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like -// `crazy-max/ghaction-github-runtime` is recommended to expose this -// environment variable to your jobs. -func (o CacheFromGitHubActionsOutput) Token() pulumix.Output[*string] { - return pulumix.Apply[CacheFromGitHubActions](o, func(v CacheFromGitHubActions) *string { return v.Token }) -} - -// The cache server URL to use for artifacts. -// -// 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] { - return pulumix.Apply[CacheFromGitHubActions](o, func(v CacheFromGitHubActions) *string { return v.Url }) -} - type CacheFromLocal struct { // Digest of manifest to import. Digest *string `pulumi:"digest"` @@ -1134,6 +1079,10 @@ func (o CacheToAzureBlobOutput) SecretAccessKey() pulumix.Output[*string] { return pulumix.Apply[CacheToAzureBlob](o, func(v CacheToAzureBlob) *string { return v.SecretAccessKey }) } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheToGitHubActions struct { // Ignore errors caused by failed cache exports. IgnoreError *bool `pulumi:"ignoreError"` @@ -1144,19 +1093,6 @@ type CacheToGitHubActions struct { // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope *string `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token *string `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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"` } // Defaults sets the appropriate defaults for CacheToGitHubActions @@ -1177,21 +1113,13 @@ func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions { scope_ := "buildkit" tmp.Scope = &scope_ } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - token_ := d.(string) - tmp.Token = &token_ - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - url_ := d.(string) - tmp.Url = &url_ - } - } return &tmp } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheToGitHubActionsArgs struct { // Ignore errors caused by failed cache exports. IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"` @@ -1202,19 +1130,6 @@ type CacheToGitHubActionsArgs struct { // This should be set if building and caching multiple images in one // workflow, otherwise caches will overwrite each other. Scope pulumix.Input[*string] `pulumi:"scope"` - // The GitHub Actions token to use. This is not a personal access tokens - // and is typically generated automatically as part of each job. - // - // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - // `crazy-max/ghaction-github-runtime` is recommended to expose this - // environment variable to your jobs. - Token pulumix.Input[*string] `pulumi:"token"` - // The cache server URL to use for artifacts. - // - // 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"` } // Defaults sets the appropriate defaults for CacheToGitHubActionsArgs @@ -1232,16 +1147,6 @@ func (val *CacheToGitHubActionsArgs) Defaults() *CacheToGitHubActionsArgs { if tmp.Scope == nil { tmp.Scope = pulumix.Ptr("buildkit") } - if tmp.Token == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { - tmp.Token = pulumix.Ptr(d.(string)) - } - } - if tmp.Url == nil { - if d := internal.GetEnvOrDefault("", nil, "ACTIONS_CACHE_URL"); d != nil { - tmp.Url = pulumix.Ptr(d.(string)) - } - } return &tmp } func (CacheToGitHubActionsArgs) ElementType() reflect.Type { @@ -1260,6 +1165,10 @@ func (i *CacheToGitHubActionsArgs) ToOutput(ctx context.Context) pulumix.Output[ return pulumix.Val(i) } +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to expose +// appropriate credentials to your GitHub workflow. type CacheToGitHubActionsOutput struct{ *pulumi.OutputState } func (CacheToGitHubActionsOutput) ElementType() reflect.Type { @@ -1298,25 +1207,6 @@ func (o CacheToGitHubActionsOutput) Scope() pulumix.Output[*string] { return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *string { return v.Scope }) } -// The GitHub Actions token to use. This is not a personal access tokens -// and is typically generated automatically as part of each job. -// -// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like -// `crazy-max/ghaction-github-runtime` is recommended to expose this -// environment variable to your jobs. -func (o CacheToGitHubActionsOutput) Token() pulumix.Output[*string] { - return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *string { return v.Token }) -} - -// The cache server URL to use for artifacts. -// -// 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] { - return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *string { return v.Url }) -} - // Include an inline cache with the exported image. type CacheToInline struct { } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java index 8c9b6f2..67d4fd7 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java @@ -12,6 +12,13 @@ import java.util.Optional; import javax.annotation.Nullable; +/** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to expose + * appropriate credentials to your GitHub workflow. + * + */ public final class CacheFromGitHubActionsArgs extends com.pulumi.resources.ResourceArgs { public static final CacheFromGitHubActionsArgs Empty = new CacheFromGitHubActionsArgs(); @@ -37,60 +44,10 @@ public final class CacheFromGitHubActionsArgs extends com.pulumi.resources.Resou return Optional.ofNullable(this.scope); } - /** - * The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - @Import(name="token") - private @Nullable Output token; - - /** - * @return The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - public Optional> token() { - return Optional.ofNullable(this.token); - } - - /** - * The cache server URL to use for artifacts. - * - * 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. - * - */ - @Import(name="url") - private @Nullable Output url; - - /** - * @return The cache server URL to use for artifacts. - * - * 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. - * - */ - public Optional> url() { - return Optional.ofNullable(this.url); - } - private CacheFromGitHubActionsArgs() {} private CacheFromGitHubActionsArgs(CacheFromGitHubActionsArgs $) { this.scope = $.scope; - this.token = $.token; - this.url = $.url; } public static Builder builder() { @@ -138,70 +95,8 @@ public final class CacheFromGitHubActionsArgs extends com.pulumi.resources.Resou return scope(Output.of(scope)); } - /** - * @param token The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - * @return builder - * - */ - public Builder token(@Nullable Output token) { - $.token = token; - return this; - } - - /** - * @param token The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - * @return builder - * - */ - public Builder token(String token) { - return token(Output.of(token)); - } - - /** - * @param url The cache server URL to use for artifacts. - * - * 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. - * - * @return builder - * - */ - public Builder url(@Nullable Output url) { - $.url = url; - return this; - } - - /** - * @param url The cache server URL to use for artifacts. - * - * 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. - * - * @return builder - * - */ - public Builder url(String url) { - return url(Output.of(url)); - } - public CacheFromGitHubActionsArgs build() { $.scope = Codegen.stringProp("scope").output().arg($.scope).def("buildkit").getNullable(); - $.token = Codegen.stringProp("token").secret().arg($.token).env("ACTIONS_RUNTIME_TOKEN").def("").getNullable(); - $.url = Codegen.stringProp("url").output().arg($.url).env("ACTIONS_CACHE_URL").def("").getNullable(); return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java index df12b15..4642a3d 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java @@ -14,6 +14,13 @@ import java.util.Optional; import javax.annotation.Nullable; +/** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to expose + * appropriate credentials to your GitHub workflow. + * + */ public final class CacheToGitHubActionsArgs extends com.pulumi.resources.ResourceArgs { public static final CacheToGitHubActionsArgs Empty = new CacheToGitHubActionsArgs(); @@ -69,62 +76,12 @@ public final class CacheToGitHubActionsArgs extends com.pulumi.resources.Resourc return Optional.ofNullable(this.scope); } - /** - * The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - @Import(name="token") - private @Nullable Output token; - - /** - * @return The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - public Optional> token() { - return Optional.ofNullable(this.token); - } - - /** - * The cache server URL to use for artifacts. - * - * 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. - * - */ - @Import(name="url") - private @Nullable Output url; - - /** - * @return The cache server URL to use for artifacts. - * - * 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. - * - */ - public Optional> url() { - return Optional.ofNullable(this.url); - } - private CacheToGitHubActionsArgs() {} private CacheToGitHubActionsArgs(CacheToGitHubActionsArgs $) { this.ignoreError = $.ignoreError; this.mode = $.mode; this.scope = $.scope; - this.token = $.token; - this.url = $.url; } public static Builder builder() { @@ -214,72 +171,10 @@ public final class CacheToGitHubActionsArgs extends com.pulumi.resources.Resourc return scope(Output.of(scope)); } - /** - * @param token The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - * @return builder - * - */ - public Builder token(@Nullable Output token) { - $.token = token; - return this; - } - - /** - * @param token The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - * @return builder - * - */ - public Builder token(String token) { - return token(Output.of(token)); - } - - /** - * @param url The cache server URL to use for artifacts. - * - * 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. - * - * @return builder - * - */ - public Builder url(@Nullable Output url) { - $.url = url; - return this; - } - - /** - * @param url The cache server URL to use for artifacts. - * - * 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. - * - * @return builder - * - */ - public Builder url(String url) { - return url(Output.of(url)); - } - public CacheToGitHubActionsArgs build() { $.ignoreError = Codegen.booleanProp("ignoreError").output().arg($.ignoreError).def(false).getNullable(); $.mode = Codegen.objectProp("mode", CacheMode.class).output().arg($.mode).def(CacheMode.Min).getNullable(); $.scope = Codegen.stringProp("scope").output().arg($.scope).def("buildkit").getNullable(); - $.token = Codegen.stringProp("token").secret().arg($.token).env("ACTIONS_RUNTIME_TOKEN").def("").getNullable(); - $.url = Codegen.stringProp("url").output().arg($.url).env("ACTIONS_CACHE_URL").def("").getNullable(); return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java index 61c5449..e322354 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java @@ -19,25 +19,6 @@ public final class CacheFromGitHubActions { * */ private @Nullable String scope; - /** - * @return The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - private @Nullable String token; - /** - * @return The cache server URL to use for artifacts. - * - * 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. - * - */ - private @Nullable String url; private CacheFromGitHubActions() {} /** @@ -50,29 +31,6 @@ public final class CacheFromGitHubActions { public Optional scope() { return Optional.ofNullable(this.scope); } - /** - * @return The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - public Optional token() { - return Optional.ofNullable(this.token); - } - /** - * @return The cache server URL to use for artifacts. - * - * 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. - * - */ - public Optional url() { - return Optional.ofNullable(this.url); - } public static Builder builder() { return new Builder(); @@ -84,14 +42,10 @@ public final class CacheFromGitHubActions { @CustomType.Builder public static final class Builder { private @Nullable String scope; - private @Nullable String token; - private @Nullable String url; public Builder() {} public Builder(CacheFromGitHubActions defaults) { Objects.requireNonNull(defaults); this.scope = defaults.scope; - this.token = defaults.token; - this.url = defaults.url; } @CustomType.Setter @@ -100,23 +54,9 @@ public final class CacheFromGitHubActions { this.scope = scope; return this; } - @CustomType.Setter - public Builder token(@Nullable String token) { - - this.token = token; - return this; - } - @CustomType.Setter - public Builder url(@Nullable String url) { - - this.url = url; - return this; - } public CacheFromGitHubActions build() { final var _resultValue = new CacheFromGitHubActions(); _resultValue.scope = scope; - _resultValue.token = token; - _resultValue.url = url; return _resultValue; } } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java index b41c95c..39e391f 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java @@ -31,25 +31,6 @@ public final class CacheToGitHubActions { * */ private @Nullable String scope; - /** - * @return The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - private @Nullable String token; - /** - * @return The cache server URL to use for artifacts. - * - * 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. - * - */ - private @Nullable String url; private CacheToGitHubActions() {} /** @@ -76,29 +57,6 @@ public final class CacheToGitHubActions { public Optional scope() { return Optional.ofNullable(this.scope); } - /** - * @return The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - * - */ - public Optional token() { - return Optional.ofNullable(this.token); - } - /** - * @return The cache server URL to use for artifacts. - * - * 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. - * - */ - public Optional url() { - return Optional.ofNullable(this.url); - } public static Builder builder() { return new Builder(); @@ -112,16 +70,12 @@ public final class CacheToGitHubActions { private @Nullable Boolean ignoreError; private @Nullable CacheMode mode; private @Nullable String scope; - private @Nullable String token; - private @Nullable String url; public Builder() {} public Builder(CacheToGitHubActions defaults) { Objects.requireNonNull(defaults); this.ignoreError = defaults.ignoreError; this.mode = defaults.mode; this.scope = defaults.scope; - this.token = defaults.token; - this.url = defaults.url; } @CustomType.Setter @@ -142,25 +96,11 @@ public final class CacheToGitHubActions { this.scope = scope; return this; } - @CustomType.Setter - public Builder token(@Nullable String token) { - - this.token = token; - return this; - } - @CustomType.Setter - public Builder url(@Nullable String url) { - - this.url = url; - return this; - } public CacheToGitHubActions build() { final var _resultValue = new CacheToGitHubActions(); _resultValue.ignoreError = ignoreError; _resultValue.mode = mode; _resultValue.scope = scope; - _resultValue.token = token; - _resultValue.url = url; return _resultValue; } } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index d6302bc..45a42b6 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -104,6 +104,12 @@ export interface CacheFromAzureBlobArgs { secretAccessKey?: pulumi.Input; } +/** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to expose + * appropriate credentials to your GitHub workflow. + */ export interface CacheFromGitHubActionsArgs { /** * The scope to use for cache keys. Defaults to `buildkit`. @@ -112,23 +118,6 @@ export interface CacheFromGitHubActionsArgs { * workflow, otherwise caches will overwrite each other. */ scope?: pulumi.Input; - /** - * The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - */ - token?: pulumi.Input; - /** - * The cache server URL to use for artifacts. - * - * 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?: pulumi.Input; } /** * cacheFromGitHubActionsArgsProvideDefaults sets the appropriate defaults for CacheFromGitHubActionsArgs @@ -137,8 +126,6 @@ export function cacheFromGitHubActionsArgsProvideDefaults(val: CacheFromGitHubAc return { ...val, scope: (val.scope) ?? "buildkit", - token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), - url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""), }; } @@ -303,6 +290,12 @@ export function cacheToAzureBlobArgsProvideDefaults(val: CacheToAzureBlobArgs): }; } +/** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to expose + * appropriate credentials to your GitHub workflow. + */ export interface CacheToGitHubActionsArgs { /** * Ignore errors caused by failed cache exports. @@ -319,23 +312,6 @@ export interface CacheToGitHubActionsArgs { * workflow, otherwise caches will overwrite each other. */ scope?: pulumi.Input; - /** - * The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - */ - token?: pulumi.Input; - /** - * The cache server URL to use for artifacts. - * - * 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?: pulumi.Input; } /** * cacheToGitHubActionsArgsProvideDefaults sets the appropriate defaults for CacheToGitHubActionsArgs @@ -346,8 +322,6 @@ export function cacheToGitHubActionsArgsProvideDefaults(val: CacheToGitHubAction ignoreError: (val.ignoreError) ?? false, mode: (val.mode) ?? "min", scope: (val.scope) ?? "buildkit", - token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), - url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""), }; } diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index bd9b8f5..512bb2d 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -104,6 +104,12 @@ export interface CacheFromAzureBlob { secretAccessKey?: string; } +/** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to expose + * appropriate credentials to your GitHub workflow. + */ export interface CacheFromGitHubActions { /** * The scope to use for cache keys. Defaults to `buildkit`. @@ -112,23 +118,6 @@ export interface CacheFromGitHubActions { * workflow, otherwise caches will overwrite each other. */ scope?: string; - /** - * The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - */ - token?: string; - /** - * The cache server URL to use for artifacts. - * - * 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; } /** * cacheFromGitHubActionsProvideDefaults sets the appropriate defaults for CacheFromGitHubActions @@ -137,8 +126,6 @@ export function cacheFromGitHubActionsProvideDefaults(val: CacheFromGitHubAction return { ...val, scope: (val.scope) ?? "buildkit", - token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), - url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""), }; } @@ -303,6 +290,12 @@ export function cacheToAzureBlobProvideDefaults(val: CacheToAzureBlob): CacheToA }; } +/** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to expose + * appropriate credentials to your GitHub workflow. + */ export interface CacheToGitHubActions { /** * Ignore errors caused by failed cache exports. @@ -319,23 +312,6 @@ export interface CacheToGitHubActions { * workflow, otherwise caches will overwrite each other. */ scope?: string; - /** - * The GitHub Actions token to use. This is not a personal access tokens - * and is typically generated automatically as part of each job. - * - * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - * `crazy-max/ghaction-github-runtime` is recommended to expose this - * environment variable to your jobs. - */ - token?: string; - /** - * The cache server URL to use for artifacts. - * - * 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; } /** * cacheToGitHubActionsProvideDefaults sets the appropriate defaults for CacheToGitHubActions @@ -346,8 +322,6 @@ export function cacheToGitHubActionsProvideDefaults(val: CacheToGitHubActions): ignoreError: (val.ignoreError) ?? false, mode: (val.mode) ?? "min", scope: (val.scope) ?? "buildkit", - token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), - url: (val.url) ?? (utilities.getEnv("ACTIONS_CACHE_URL") || ""), }; } diff --git a/sdk/python/pulumi_docker_build/_inputs.py b/sdk/python/pulumi_docker_build/_inputs.py index dcf7338..fce0a5f 100644 --- a/sdk/python/pulumi_docker_build/_inputs.py +++ b/sdk/python/pulumi_docker_build/_inputs.py @@ -281,6 +281,12 @@ class CacheFromAzureBlobArgs: if not MYPY: class CacheFromGitHubActionsArgsDict(TypedDict): + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. + """ scope: NotRequired[pulumi.Input[_builtins.str]] """ The scope to use for cache keys. Defaults to `buildkit`. @@ -288,61 +294,27 @@ if not MYPY: This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other. """ - token: NotRequired[pulumi.Input[_builtins.str]] - """ - The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - """ - url: NotRequired[pulumi.Input[_builtins.str]] - """ - The cache server URL to use for artifacts. - - 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. - """ elif False: CacheFromGitHubActionsArgsDict: TypeAlias = Mapping[str, Any] @pulumi.input_type class CacheFromGitHubActionsArgs: def __init__(__self__, *, - scope: Optional[pulumi.Input[_builtins.str]] = None, - token: Optional[pulumi.Input[_builtins.str]] = None, - url: Optional[pulumi.Input[_builtins.str]] = None): + scope: Optional[pulumi.Input[_builtins.str]] = None): """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. :param pulumi.Input[_builtins.str] scope: The scope to use for cache keys. Defaults to `buildkit`. This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other. - :param pulumi.Input[_builtins.str] token: The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - :param pulumi.Input[_builtins.str] url: The cache server URL to use for artifacts. - - 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. """ if scope is None: scope = 'buildkit' if scope is not None: pulumi.set(__self__, "scope", scope) - if token is None: - token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') - if token is not None: - pulumi.set(__self__, "token", token) - if url is None: - url = (_utilities.get_env('ACTIONS_CACHE_URL') or '') - if url is not None: - pulumi.set(__self__, "url", url) @_builtins.property @pulumi.getter @@ -359,39 +331,6 @@ class CacheFromGitHubActionsArgs: def scope(self, value: Optional[pulumi.Input[_builtins.str]]): pulumi.set(self, "scope", value) - @_builtins.property - @pulumi.getter - def token(self) -> Optional[pulumi.Input[_builtins.str]]: - """ - The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - """ - return pulumi.get(self, "token") - - @token.setter - def token(self, value: Optional[pulumi.Input[_builtins.str]]): - pulumi.set(self, "token", value) - - @_builtins.property - @pulumi.getter - def url(self) -> Optional[pulumi.Input[_builtins.str]]: - """ - The cache server URL to use for artifacts. - - 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. - """ - return pulumi.get(self, "url") - - @url.setter - def url(self, value: Optional[pulumi.Input[_builtins.str]]): - pulumi.set(self, "url", value) - if not MYPY: class CacheFromLocalArgsDict(TypedDict): @@ -977,6 +916,12 @@ class CacheToAzureBlobArgs: if not MYPY: class CacheToGitHubActionsArgsDict(TypedDict): + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. + """ ignore_error: NotRequired[pulumi.Input[_builtins.bool]] """ Ignore errors caused by failed cache exports. @@ -992,23 +937,6 @@ if not MYPY: This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other. """ - token: NotRequired[pulumi.Input[_builtins.str]] - """ - The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - """ - url: NotRequired[pulumi.Input[_builtins.str]] - """ - The cache server URL to use for artifacts. - - 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. - """ elif False: CacheToGitHubActionsArgsDict: TypeAlias = Mapping[str, Any] @@ -1017,27 +945,18 @@ class CacheToGitHubActionsArgs: def __init__(__self__, *, ignore_error: Optional[pulumi.Input[_builtins.bool]] = None, mode: Optional[pulumi.Input['CacheMode']] = None, - scope: Optional[pulumi.Input[_builtins.str]] = None, - token: Optional[pulumi.Input[_builtins.str]] = None, - url: Optional[pulumi.Input[_builtins.str]] = None): + scope: Optional[pulumi.Input[_builtins.str]] = None): """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. :param pulumi.Input[_builtins.bool] ignore_error: Ignore errors caused by failed cache exports. :param pulumi.Input['CacheMode'] mode: The cache mode to use. Defaults to `min`. :param pulumi.Input[_builtins.str] scope: The scope to use for cache keys. Defaults to `buildkit`. This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other. - :param pulumi.Input[_builtins.str] token: The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - :param pulumi.Input[_builtins.str] url: The cache server URL to use for artifacts. - - 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. """ if ignore_error is None: ignore_error = False @@ -1051,14 +970,6 @@ class CacheToGitHubActionsArgs: scope = 'buildkit' if scope is not None: pulumi.set(__self__, "scope", scope) - if token is None: - token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') - if token is not None: - pulumi.set(__self__, "token", token) - if url is None: - url = (_utilities.get_env('ACTIONS_CACHE_URL') or '') - if url is not None: - pulumi.set(__self__, "url", url) @_builtins.property @pulumi.getter(name="ignoreError") @@ -1099,39 +1010,6 @@ class CacheToGitHubActionsArgs: def scope(self, value: Optional[pulumi.Input[_builtins.str]]): pulumi.set(self, "scope", value) - @_builtins.property - @pulumi.getter - def token(self) -> Optional[pulumi.Input[_builtins.str]]: - """ - The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - """ - return pulumi.get(self, "token") - - @token.setter - def token(self, value: Optional[pulumi.Input[_builtins.str]]): - pulumi.set(self, "token", value) - - @_builtins.property - @pulumi.getter - def url(self) -> Optional[pulumi.Input[_builtins.str]]: - """ - The cache server URL to use for artifacts. - - 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. - """ - return pulumi.get(self, "url") - - @url.setter - def url(self, value: Optional[pulumi.Input[_builtins.str]]): - pulumi.set(self, "url", value) - if not MYPY: class CacheToInlineArgsDict(TypedDict): diff --git a/sdk/python/pulumi_docker_build/outputs.py b/sdk/python/pulumi_docker_build/outputs.py index a484d03..4b37252 100644 --- a/sdk/python/pulumi_docker_build/outputs.py +++ b/sdk/python/pulumi_docker_build/outputs.py @@ -293,39 +293,28 @@ class CacheFromAzureBlob(dict): @pulumi.output_type class CacheFromGitHubActions(dict): + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. + """ def __init__(__self__, *, - scope: Optional[_builtins.str] = None, - token: Optional[_builtins.str] = None, - url: Optional[_builtins.str] = None): + scope: Optional[_builtins.str] = None): """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. :param _builtins.str scope: The scope to use for cache keys. Defaults to `buildkit`. This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other. - :param _builtins.str token: The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - :param _builtins.str url: The cache server URL to use for artifacts. - - 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. """ if scope is None: scope = 'buildkit' if scope is not None: pulumi.set(__self__, "scope", scope) - if token is None: - token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') - if token is not None: - pulumi.set(__self__, "token", token) - if url is None: - url = (_utilities.get_env('ACTIONS_CACHE_URL') or '') - if url is not None: - pulumi.set(__self__, "url", url) @_builtins.property @pulumi.getter @@ -338,31 +327,6 @@ class CacheFromGitHubActions(dict): """ return pulumi.get(self, "scope") - @_builtins.property - @pulumi.getter - def token(self) -> Optional[_builtins.str]: - """ - The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - """ - return pulumi.get(self, "token") - - @_builtins.property - @pulumi.getter - def url(self) -> Optional[_builtins.str]: - """ - The cache server URL to use for artifacts. - - 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. - """ - return pulumi.get(self, "url") - @pulumi.output_type class CacheFromLocal(dict): @@ -784,6 +748,12 @@ class CacheToAzureBlob(dict): @pulumi.output_type class CacheToGitHubActions(dict): + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. + """ @staticmethod def __key_warning(key: str): suggest = None @@ -804,27 +774,18 @@ class CacheToGitHubActions(dict): def __init__(__self__, *, ignore_error: Optional[_builtins.bool] = None, mode: Optional['CacheMode'] = None, - scope: Optional[_builtins.str] = None, - token: Optional[_builtins.str] = None, - url: Optional[_builtins.str] = None): + scope: Optional[_builtins.str] = None): """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to expose + appropriate credentials to your GitHub workflow. :param _builtins.bool ignore_error: Ignore errors caused by failed cache exports. :param 'CacheMode' mode: The cache mode to use. Defaults to `min`. :param _builtins.str scope: The scope to use for cache keys. Defaults to `buildkit`. This should be set if building and caching multiple images in one workflow, otherwise caches will overwrite each other. - :param _builtins.str token: The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - :param _builtins.str url: The cache server URL to use for artifacts. - - 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. """ if ignore_error is None: ignore_error = False @@ -838,14 +799,6 @@ class CacheToGitHubActions(dict): scope = 'buildkit' if scope is not None: pulumi.set(__self__, "scope", scope) - if token is None: - token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') - if token is not None: - pulumi.set(__self__, "token", token) - if url is None: - url = (_utilities.get_env('ACTIONS_CACHE_URL') or '') - if url is not None: - pulumi.set(__self__, "url", url) @_builtins.property @pulumi.getter(name="ignoreError") @@ -874,31 +827,6 @@ class CacheToGitHubActions(dict): """ return pulumi.get(self, "scope") - @_builtins.property - @pulumi.getter - def token(self) -> Optional[_builtins.str]: - """ - The GitHub Actions token to use. This is not a personal access tokens - and is typically generated automatically as part of each job. - - Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like - `crazy-max/ghaction-github-runtime` is recommended to expose this - environment variable to your jobs. - """ - return pulumi.get(self, "token") - - @_builtins.property - @pulumi.getter - def url(self) -> Optional[_builtins.str]: - """ - The cache server URL to use for artifacts. - - 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. - """ - return pulumi.get(self, "url") - @pulumi.output_type class CacheToInline(dict):