githubactions

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command *cli.Command = &cli.Command{
	Name:    commandName,
	Aliases: []string{"gha"},
	Usage:   "Add GitHub Actions to a project",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:     "project-file",
			Aliases:  []string{"f"},
			Usage:    "The project file to use. We currently support .NET, Go or a generic project (Dockerfile).",
			Required: true,
		},
		&cli.StringFlag{
			Name:    "runtime-cloud-provider",
			Aliases: []string{"r"},
			Usage:   "The runtime cloud provider to use",
			Value:   "aks",
			Action: func(c *cli.Context, runtimeCloudProvider string) error {
				allowedRuntimeCloudProviders := []string{"aks", "gke"}
				if !slices.Contains(allowedRuntimeCloudProviders, strings.ToLower(runtimeCloudProvider)) {
					return cli.Exit(
						fmt.Sprintf(
							"Invalid runtime cloud provider '%s' provided: must be one of %v (ignoring case)",
							runtimeCloudProvider,
							allowedRuntimeCloudProviders),
						1,
					)
				}

				return nil
			},
		},
		&cli.StringFlag{
			Name:    "default-branch",
			Aliases: []string{"b"},
			Usage:   "The default branch of the repository",
			Value:   "trunk",
		},
		&cli.StringFlag{
			Name:    "system-name",
			Aliases: []string{"s"},
			Usage:   "The name of the system",
		},
		&cli.StringFlag{
			Name:    "application-name",
			Aliases: []string{"a"},
			Usage:   "The name of the application",
		},
		&cli.StringFlag{
			Name:    "helm-values-path",
			Aliases: []string{"H"},
			Usage:   "The path to the Helm values file",
		},
	},
	Action: GitHubActions,
}

Functions

func GitHubActions

func GitHubActions(c *cli.Context) error

Types

type ReplaceWorkflowPlaceholdersOptions

type ReplaceWorkflowPlaceholdersOptions struct {
	DefaultBranch   string
	SystemName      string
	ApplicationName string
	HelmValuesPath  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL