mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
support for secrets
Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
bdb0c35ba3
commit
0094b96051
14 changed files with 708 additions and 9 deletions
|
@ -30,9 +30,10 @@ func Execute(ctx context.Context, version string) {
|
|||
rootCmd.Flags().BoolP("watch", "w", false, "watch the contents of the local repo and run when files change")
|
||||
rootCmd.Flags().BoolP("list", "l", false, "list workflows")
|
||||
rootCmd.Flags().StringP("job", "j", "", "run job")
|
||||
rootCmd.Flags().StringArrayVarP(&input.secrets, "secret", "s", []string{}, "secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)")
|
||||
rootCmd.Flags().BoolVarP(&input.reuseContainers, "reuse", "r", false, "reuse action containers to maintain state")
|
||||
rootCmd.Flags().BoolVarP(&input.forcePull, "pull", "p", false, "pull docker image(s) if already present")
|
||||
rootCmd.Flags().StringVarP(&input.eventPath, "event", "e", "", "path to event JSON file")
|
||||
rootCmd.Flags().StringVarP(&input.eventPath, "eventpath", "e", "", "path to event JSON file")
|
||||
rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow files")
|
||||
rootCmd.PersistentFlags().StringVarP(&input.workdir, "directory", "C", ".", "working directory")
|
||||
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "verbose output")
|
||||
|
@ -96,6 +97,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
|
|||
ReuseContainers: input.reuseContainers,
|
||||
Workdir: input.Workdir(),
|
||||
LogOutput: input.logOutput,
|
||||
Secrets: newSecrets(input.secrets),
|
||||
}
|
||||
runner, err := runner.New(config)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue