Compare commits

...

5 Commits

Author SHA1 Message Date
Pulumi Bot
05a654f176 [internal] Update GitHub Actions workflow files 2025-10-24 05:46:07 +00:00
Pulumi Bot
faffc8cc45 Update GitHub Actions workflows. (#633)
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit 5619381e924fbac90750f41b6a27cadcd11c4c2d.
2025-10-22 05:56:54 +00:00
Alberto Pose
2b1230f252 Introduce ${GOTEST} Makefile variable to override test runner. (#632)
Allow to use other tools like `gotestsum` locally.
2025-10-20 15:20:48 +01:00
Pulumi Bot
eaf5461bbc Update GitHub Actions workflows. (#631)
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit f0bcdaf5cb0825e542d0a2eb71f05d538135a9bc.
2025-10-18 05:52:38 +00:00
Alberto Pose
38e65a3f81 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 <bryce@pulumi.com>
2025-10-17 11:00:40 +01:00
25 changed files with 242 additions and 1205 deletions

View File

@@ -16,9 +16,7 @@ on:
workflow_dispatch: {}
env:
PROVIDER: docker-build
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
TRAVIS_OS_NAME: linux
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
GOVERSION: "1.21.x"
NODEVERSION: "20.x"
PYTHONVERSION: "3.11.8"
@@ -255,7 +253,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -456,7 +454,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -683,7 +681,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -764,8 +762,7 @@ jobs:
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: -c ../.golangci.yml
working-directory: provider
working-directory: .
name: lint
if: github.event_name == 'repository_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository

View File

@@ -7,9 +7,7 @@ on:
- v*.*.*-**
env:
PROVIDER: docker-build
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
TRAVIS_OS_NAME: linux
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
GOVERSION: "1.21.x"
NODEVERSION: "20.x"
PYTHONVERSION: "3.11.8"
@@ -244,7 +242,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -409,7 +407,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -636,7 +634,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org

View File

@@ -8,9 +8,7 @@ on:
- "!v*.*.*-**"
env:
PROVIDER: docker-build
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
TRAVIS_OS_NAME: linux
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
GOVERSION: "1.21.x"
NODEVERSION: "20.x"
PYTHONVERSION: "3.11.8"
@@ -247,7 +245,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -412,7 +410,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -639,7 +637,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org

View File

@@ -11,9 +11,7 @@ on:
workflow_dispatch: {}
env:
PROVIDER: docker-build
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
TRAVIS_OS_NAME: linux
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
GOVERSION: "1.21.x"
NODEVERSION: "20.x"
PYTHONVERSION: "3.11.8"
@@ -279,7 +277,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -448,7 +446,7 @@ jobs:
- name: Install Pulumi CLI
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e # v6.5.0
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
@@ -608,8 +606,7 @@ jobs:
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: -c ../.golangci.yml
working-directory: provider
working-directory: .
name: lint
if: github.event_name == 'repository_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository

View File

@@ -8,9 +8,7 @@ on:
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
PROVIDER: docker-build
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
TRAVIS_OS_NAME: linux
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
GOVERSION: "1.21.x"
NODEVERSION: "20.x"
PYTHONVERSION: "3.11.8"
@@ -64,7 +62,7 @@ jobs:
with:
dotnet-version: ${{ env.DOTNETVERSION }}
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org

View File

@@ -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

View File

@@ -19,6 +19,7 @@ TESTPARALLELISM := 4
PULUMI := pulumi
GOGLANGCILINT := golangci-lint
GOTEST := go test
# Override during CI using `make [TARGET] PROVIDER_VERSION=""` or by setting a PROVIDER_VERSION environment variable
# Local & branch builds will just used this fixed default version unless specified
@@ -46,10 +47,10 @@ provider_debug::
(cd provider && go build -o $(WORKING_DIR)/bin/${PROVIDER} -gcflags="all=-N -l" -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION_GENERIC}" $(PROJECT)/${PROVIDER_PATH}/cmd/$(PROVIDER))
test_provider:: # Required by CI
go test -short -v -coverprofile="coverage.txt" -coverpkg=./provider/... -timeout 2h -parallel ${TESTPARALLELISM} ./provider/...
${GOTEST} -short -v -coverprofile="coverage.txt" -coverpkg=./provider/... -timeout 2h -parallel ${TESTPARALLELISM} ./provider/...
test_examples: install_nodejs_sdk install_dotnet_sdk
go test -short -v -cover -tags=all -timeout 2h -parallel ${TESTPARALLELISM} ./examples/...
${GOTEST} -short -v -cover -tags=all -timeout 2h -parallel ${TESTPARALLELISM} ./examples/...
test_all:: test_provider test_examples

View File

@@ -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"

View File

@@ -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, ",")
}

View File

@@ -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)

View File

@@ -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",
},
},
},

View File

@@ -10,6 +10,12 @@ using Pulumi.Serialization;
namespace Pulumi.DockerBuild.Inputs
{
/// <summary>
/// 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.
/// </summary>
public sealed class CacheFromGitHubActionsArgs : global::Pulumi.ResourceArgs
{
/// <summary>
@@ -21,42 +27,9 @@ namespace Pulumi.DockerBuild.Inputs
[Input("scope")]
public Input<string>? Scope { get; set; }
[Input("token")]
private Input<string>? _token;
/// <summary>
/// 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.
/// </summary>
public Input<string>? Token
{
get => _token;
set
{
var emptySecret = Output.CreateSecret(0);
_token = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
}
}
/// <summary>
/// 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.
/// </summary>
[Input("url")]
public Input<string>? 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();
}

View File

@@ -10,6 +10,12 @@ using Pulumi.Serialization;
namespace Pulumi.DockerBuild.Inputs
{
/// <summary>
/// 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.
/// </summary>
public sealed class CacheToGitHubActionsArgs : global::Pulumi.ResourceArgs
{
/// <summary>
@@ -33,44 +39,11 @@ namespace Pulumi.DockerBuild.Inputs
[Input("scope")]
public Input<string>? Scope { get; set; }
[Input("token")]
private Input<string>? _token;
/// <summary>
/// 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.
/// </summary>
public Input<string>? Token
{
get => _token;
set
{
var emptySecret = Output.CreateSecret(0);
_token = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
}
}
/// <summary>
/// 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.
/// </summary>
[Input("url")]
public Input<string>? 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();
}

View File

@@ -10,6 +10,12 @@ using Pulumi.Serialization;
namespace Pulumi.DockerBuild.Outputs
{
/// <summary>
/// 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.
/// </summary>
[OutputType]
public sealed class CacheFromGitHubActions
{
@@ -20,35 +26,11 @@ namespace Pulumi.DockerBuild.Outputs
/// workflow, otherwise caches will overwrite each other.
/// </summary>
public readonly string? Scope;
/// <summary>
/// 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.
/// </summary>
public readonly string? Token;
/// <summary>
/// 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.
/// </summary>
public readonly string? Url;
[OutputConstructor]
private CacheFromGitHubActions(
string? scope,
string? token,
string? url)
private CacheFromGitHubActions(string? scope)
{
Scope = scope;
Token = token;
Url = url;
}
}
}

View File

@@ -10,6 +10,12 @@ using Pulumi.Serialization;
namespace Pulumi.DockerBuild.Outputs
{
/// <summary>
/// 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.
/// </summary>
[OutputType]
public sealed class CacheToGitHubActions
{
@@ -28,23 +34,6 @@ namespace Pulumi.DockerBuild.Outputs
/// workflow, otherwise caches will overwrite each other.
/// </summary>
public readonly string? Scope;
/// <summary>
/// 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.
/// </summary>
public readonly string? Token;
/// <summary>
/// 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.
/// </summary>
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;
}
}
}

View File

@@ -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 {
}

View File

@@ -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 {
}

View File

@@ -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<String> 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<Output<String>> 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<String> 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<Output<String>> 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<String> 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<String> 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 $;
}
}

View File

@@ -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<String> 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<Output<String>> 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<String> 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<Output<String>> 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<String> 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<String> 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 $;
}
}

View File

@@ -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<String> 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<String> 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<String> 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;
}
}

View File

@@ -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<String> 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<String> 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<String> 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;
}
}

View File

@@ -104,6 +104,12 @@ export interface CacheFromAzureBlobArgs {
secretAccessKey?: pulumi.Input<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 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<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?: pulumi.Input<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?: pulumi.Input<string>;
}
/**
* 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<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?: pulumi.Input<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?: pulumi.Input<string>;
}
/**
* 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") || ""),
};
}

View File

@@ -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") || ""),
};
}

View File

@@ -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):

View File

@@ -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):