Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Use this data source to retrieve information about a GitHub Actions public key of a specific environment. This data source is required to be used with other GitHub secrets interactions.
Note that the provider token must have admin rights to a repository to retrieve the action public keys of it’s environments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getActionsEnvironmentPublicKey({
repository: "example_repo",
environment: "example_environment",
});
import pulumi
import pulumi_github as github
example = github.get_actions_environment_public_key(repository="example_repo",
environment="example_environment")
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.GetActionsEnvironmentPublicKey(ctx, &github.GetActionsEnvironmentPublicKeyArgs{
Repository: "example_repo",
Environment: "example_environment",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetActionsEnvironmentPublicKey.Invoke(new()
{
Repository = "example_repo",
Environment = "example_environment",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetActionsEnvironmentPublicKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = GithubFunctions.getActionsEnvironmentPublicKey(GetActionsEnvironmentPublicKeyArgs.builder()
.repository("example_repo")
.environment("example_environment")
.build());
}
}
variables:
example:
fn::invoke:
function: github:getActionsEnvironmentPublicKey
arguments:
repository: example_repo
environment: example_environment
Using getActionsEnvironmentPublicKey
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getActionsEnvironmentPublicKey(args: GetActionsEnvironmentPublicKeyArgs, opts?: InvokeOptions): Promise<GetActionsEnvironmentPublicKeyResult>
function getActionsEnvironmentPublicKeyOutput(args: GetActionsEnvironmentPublicKeyOutputArgs, opts?: InvokeOptions): Output<GetActionsEnvironmentPublicKeyResult>def get_actions_environment_public_key(environment: Optional[str] = None,
repository: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetActionsEnvironmentPublicKeyResult
def get_actions_environment_public_key_output(environment: Optional[pulumi.Input[str]] = None,
repository: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetActionsEnvironmentPublicKeyResult]func GetActionsEnvironmentPublicKey(ctx *Context, args *GetActionsEnvironmentPublicKeyArgs, opts ...InvokeOption) (*GetActionsEnvironmentPublicKeyResult, error)
func GetActionsEnvironmentPublicKeyOutput(ctx *Context, args *GetActionsEnvironmentPublicKeyOutputArgs, opts ...InvokeOption) GetActionsEnvironmentPublicKeyResultOutput> Note: This function is named GetActionsEnvironmentPublicKey in the Go SDK.
public static class GetActionsEnvironmentPublicKey
{
public static Task<GetActionsEnvironmentPublicKeyResult> InvokeAsync(GetActionsEnvironmentPublicKeyArgs args, InvokeOptions? opts = null)
public static Output<GetActionsEnvironmentPublicKeyResult> Invoke(GetActionsEnvironmentPublicKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetActionsEnvironmentPublicKeyResult> getActionsEnvironmentPublicKey(GetActionsEnvironmentPublicKeyArgs args, InvokeOptions options)
public static Output<GetActionsEnvironmentPublicKeyResult> getActionsEnvironmentPublicKey(GetActionsEnvironmentPublicKeyArgs args, InvokeOptions options)
fn::invoke:
function: github:index/getActionsEnvironmentPublicKey:getActionsEnvironmentPublicKey
arguments:
# arguments dictionaryThe following arguments are supported:
- Environment string
- Name of the environment to get public key from.
- Repository string
- Name of the repository to get public key from.
- Environment string
- Name of the environment to get public key from.
- Repository string
- Name of the repository to get public key from.
- environment String
- Name of the environment to get public key from.
- repository String
- Name of the repository to get public key from.
- environment string
- Name of the environment to get public key from.
- repository string
- Name of the repository to get public key from.
- environment str
- Name of the environment to get public key from.
- repository str
- Name of the repository to get public key from.
- environment String
- Name of the environment to get public key from.
- repository String
- Name of the repository to get public key from.
getActionsEnvironmentPublicKey Result
The following output properties are available:
- Environment string
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Actual key retrieved.
- Key
Id string - ID of the key that has been retrieved.
- Repository string
- Environment string
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Actual key retrieved.
- Key
Id string - ID of the key that has been retrieved.
- Repository string
- environment String
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- Actual key retrieved.
- key
Id String - ID of the key that has been retrieved.
- repository String
- environment string
- id string
- The provider-assigned unique ID for this managed resource.
- key string
- Actual key retrieved.
- key
Id string - ID of the key that has been retrieved.
- repository string
- environment str
- id str
- The provider-assigned unique ID for this managed resource.
- key str
- Actual key retrieved.
- key_
id str - ID of the key that has been retrieved.
- repository str
- environment String
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- Actual key retrieved.
- key
Id String - ID of the key that has been retrieved.
- repository String
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
