Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRemoteHostIsNotGitHub = errors.New("not a github host")
Functions ¶
func EnsureRemote ¶
func EnsureRemote(ctx context.Context, repositoryPath string, remoteName string, gitCli *git.Cli) (string, error)
ensureRemote ensures that a git repository located at `repositoryPath` has a remote and it is configured with a URL for a repository hosted on GitHub. It returns the repository slug `(<organization>/<repo>)`.
func GetSlugForRemote ¶
Types ¶
type FederatedTokenClient ¶
type FederatedTokenClient struct {
// contains filtered or unexported fields
}
FederatedTokenClient is a client that can be used to fetch federated access tokens when running in GitHub actions. It provides similar behavior to logic in the `@actions/core` JavaScript package that actions can use.
func NewFederatedTokenClient ¶
func NewFederatedTokenClient(options *azcore.ClientOptions) *FederatedTokenClient
func (*FederatedTokenClient) TokenForAudience ¶
func (c *FederatedTokenClient) TokenForAudience(ctx context.Context, audience string) (string, error)
TokenForAudience gets the federated token from GitHub Actions. It follows the same strategy as the as the getIDToken function from `@actions/core`.
Click to show internal directories.
Click to hide internal directories.