1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

add flag of privileged mode

This commit is contained in:
whywaita 2020-08-02 05:21:49 +09:00
parent 0049033470
commit 4d237924ac
6 changed files with 8 additions and 0 deletions

View file

@ -41,6 +41,7 @@ func Execute(ctx context.Context, version string) {
rootCmd.Flags().BoolVarP(&input.bindWorkdir, "bind", "b", false, "bind working directory to container, rather than copy")
rootCmd.Flags().BoolVarP(&input.forcePull, "pull", "p", false, "pull docker image(s) if already present")
rootCmd.Flags().StringVarP(&input.eventPath, "eventpath", "e", "", "path to event JSON file")
rootCmd.Flags().BoolVar(&input.privileged, "privileged", false, "use privileged mode")
rootCmd.PersistentFlags().StringVarP(&input.actor, "actor", "a", "nektos/act", "user that triggered the event")
rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow file(s)")
rootCmd.PersistentFlags().StringVarP(&input.workdir, "directory", "C", ".", "working directory")
@ -168,6 +169,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
Env: envs,
Secrets: secrets,
Platforms: input.newPlatforms(),
Privileged: input.privileged,
}
runner, err := runner.New(config)
if err != nil {