Fix GitHub action URL (#80)

Our docs and default value for the GitHub action cache URL were
referring to the
[wrong](https://github.com/tonistiigi/go-actions-cache/blob/master/api.md)
environment variable.

I was under the impression that the underlying library ends up checking
for the correct variable later so this would be only cosmetic, but a
user
[confirmed](https://github.com/pulumi/pulumi-docker-build/issues/77#issuecomment-2135621983)
this does appear to break things.

I brought over an old test I had written while this was still in the
pulumi-docker repo, but unfortunately it doesn't currently test GHA due
to ci-mgmt limitations
https://github.com/pulumi/pulumi-docker-build/issues/82.

Fixes https://github.com/pulumi/pulumi-docker-build/issues/77.
This commit is contained in:
Bryce Lampe
2024-05-29 05:29:58 -07:00
committed by GitHub
parent c9e5913af1
commit f0aaf7095d
22 changed files with 2228 additions and 64 deletions

View File

@@ -45,7 +45,7 @@ namespace Pulumi.DockerBuild.Inputs
/// <summary>
/// The cache server URL to use for artifacts.
///
/// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
/// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
/// `crazy-max/ghaction-github-runtime` is recommended to expose this
/// environment variable to your jobs.
/// </summary>
@@ -56,7 +56,7 @@ namespace Pulumi.DockerBuild.Inputs
{
Scope = Utilities.GetEnv("buildkit") ?? "";
Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? "";
Url = Utilities.GetEnv("ACTIONS_RUNTIME_URL") ?? "";
Url = Utilities.GetEnv("ACTIONS_CACHE_URL") ?? "";
}
public static new CacheFromGitHubActionsArgs Empty => new CacheFromGitHubActionsArgs();
}

View File

@@ -57,7 +57,7 @@ namespace Pulumi.DockerBuild.Inputs
/// <summary>
/// The cache server URL to use for artifacts.
///
/// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
/// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
/// `crazy-max/ghaction-github-runtime` is recommended to expose this
/// environment variable to your jobs.
/// </summary>
@@ -70,7 +70,7 @@ namespace Pulumi.DockerBuild.Inputs
Mode = Pulumi.DockerBuild.CacheMode.Min;
Scope = Utilities.GetEnv("buildkit") ?? "";
Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? "";
Url = Utilities.GetEnv("ACTIONS_RUNTIME_URL") ?? "";
Url = Utilities.GetEnv("ACTIONS_CACHE_URL") ?? "";
}
public static new CacheToGitHubActionsArgs Empty => new CacheToGitHubActionsArgs();
}

View File

@@ -32,7 +32,7 @@ namespace Pulumi.DockerBuild.Outputs
/// <summary>
/// The cache server URL to use for artifacts.
///
/// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
/// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
/// `crazy-max/ghaction-github-runtime` is recommended to expose this
/// environment variable to your jobs.
/// </summary>

View File

@@ -40,7 +40,7 @@ namespace Pulumi.DockerBuild.Outputs
/// <summary>
/// The cache server URL to use for artifacts.
///
/// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
/// Defaults to `$ACTIONS_CACHE_URL`, although a separate action like
/// `crazy-max/ghaction-github-runtime` is recommended to expose this
/// environment variable to your jobs.
/// </summary>