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