All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.dockerbuild.outputs.CacheFromGitHubActions Maven / Gradle / Ivy

Go to download

A Pulumi provider for building modern Docker images with buildx and BuildKit.

There is a newer version: 0.1.0-alpha.1729468870
Show newest version
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.dockerbuild.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CacheFromGitHubActions {
    /**
     * @return 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.
     * 
     */
    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() {}
    /**
     * @return 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.
     * 
     */
    public Optional scope() {
        return Optional.ofNullable(this.scope);
    }
    /**
     * @return The GitHub Actions token to use. This is not a personal access tokens
     * and is typically generated automatically as part of each job.
     * 
     * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like
     * `crazy-max/ghaction-github-runtime` is recommended to expose this
     * environment variable to your jobs.
     * 
     */
    public Optional token() {
        return Optional.ofNullable(this.token);
    }
    /**
     * @return The cache server URL to use for artifacts.
     * 
     * Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
     * `crazy-max/ghaction-github-runtime` is recommended to expose this
     * environment variable to your jobs.
     * 
     */
    public Optional url() {
        return Optional.ofNullable(this.url);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(CacheFromGitHubActions defaults) {
        return new Builder(defaults);
    }
    @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
        public Builder scope(@Nullable String scope) {

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy