GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi
github.getActionsRegistrationToken
Explore with Pulumi AI
Use this data source to retrieve a GitHub Actions repository registration token. This token can then be used to register a self-hosted runner.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getActionsRegistrationToken({
repository: "example_repo",
});
import pulumi
import pulumi_github as github
example = github.get_actions_registration_token(repository="example_repo")
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.GetActionsRegistrationToken(ctx, &github.GetActionsRegistrationTokenArgs{
Repository: "example_repo",
}, 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.GetActionsRegistrationToken.Invoke(new()
{
Repository = "example_repo",
});
});
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.GetActionsRegistrationTokenArgs;
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.getActionsRegistrationToken(GetActionsRegistrationTokenArgs.builder()
.repository("example_repo")
.build());
}
}
variables:
example:
fn::invoke:
Function: github:getActionsRegistrationToken
Arguments:
repository: example_repo
Using getActionsRegistrationToken
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 getActionsRegistrationToken(args: GetActionsRegistrationTokenArgs, opts?: InvokeOptions): Promise<GetActionsRegistrationTokenResult>
function getActionsRegistrationTokenOutput(args: GetActionsRegistrationTokenOutputArgs, opts?: InvokeOptions): Output<GetActionsRegistrationTokenResult>
def get_actions_registration_token(repository: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetActionsRegistrationTokenResult
def get_actions_registration_token_output(repository: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetActionsRegistrationTokenResult]
func GetActionsRegistrationToken(ctx *Context, args *GetActionsRegistrationTokenArgs, opts ...InvokeOption) (*GetActionsRegistrationTokenResult, error)
func GetActionsRegistrationTokenOutput(ctx *Context, args *GetActionsRegistrationTokenOutputArgs, opts ...InvokeOption) GetActionsRegistrationTokenResultOutput
> Note: This function is named GetActionsRegistrationToken
in the Go SDK.
public static class GetActionsRegistrationToken
{
public static Task<GetActionsRegistrationTokenResult> InvokeAsync(GetActionsRegistrationTokenArgs args, InvokeOptions? opts = null)
public static Output<GetActionsRegistrationTokenResult> Invoke(GetActionsRegistrationTokenInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetActionsRegistrationTokenResult> getActionsRegistrationToken(GetActionsRegistrationTokenArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: github:index/getActionsRegistrationToken:getActionsRegistrationToken
arguments:
# arguments dictionary
The following arguments are supported:
- Repository string
- Name of the repository to get a GitHub Actions registration token for.
- Repository string
- Name of the repository to get a GitHub Actions registration token for.
- repository String
- Name of the repository to get a GitHub Actions registration token for.
- repository string
- Name of the repository to get a GitHub Actions registration token for.
- repository str
- Name of the repository to get a GitHub Actions registration token for.
- repository String
- Name of the repository to get a GitHub Actions registration token for.
getActionsRegistrationToken Result
The following output properties are available:
- Expires
At int - The token expiration date.
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- Token string
- The token that has been retrieved.
- Expires
At int - The token expiration date.
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- Token string
- The token that has been retrieved.
- expires
At Integer - The token expiration date.
- id String
- The provider-assigned unique ID for this managed resource.
- repository String
- token String
- The token that has been retrieved.
- expires
At number - The token expiration date.
- id string
- The provider-assigned unique ID for this managed resource.
- repository string
- token string
- The token that has been retrieved.
- expires_
at int - The token expiration date.
- id str
- The provider-assigned unique ID for this managed resource.
- repository str
- token str
- The token that has been retrieved.
- expires
At Number - The token expiration date.
- id String
- The provider-assigned unique ID for this managed resource.
- repository String
- token String
- The token that has been retrieved.
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
github
Terraform Provider.