summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorCasey Lee <cplee@nektos.com>2020-02-25 02:48:21 +0100
committerCasey Lee <cplee@nektos.com>2020-02-25 02:48:21 +0100
commit1121f6e1329a2af1e1f1ab77a924cc9fe9c74905 (patch)
treed4c9f76324eb2c42f5f7512fcd1b2b55ecdb652d /cmd
parentmove action cache to volume (diff)
downloadforgejo-act-1121f6e1329a2af1e1f1ab77a924cc9fe9c74905.tar.xz
forgejo-act-1121f6e1329a2af1e1f1ab77a924cc9fe9c74905.zip
run with copy of workingdir
Diffstat (limited to 'cmd')
-rw-r--r--cmd/input.go1
-rw-r--r--cmd/root.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/cmd/input.go b/cmd/input.go
index 63a64ad..3b1b34f 100644
--- a/cmd/input.go
+++ b/cmd/input.go
@@ -11,6 +11,7 @@ type Input struct {
workflowsPath string
eventPath string
reuseContainers bool
+ bindWorkdir bool
secrets []string
platforms []string
dryrun bool
diff --git a/cmd/root.go b/cmd/root.go
index a22b10f..efbc05c 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -33,6 +33,7 @@ func Execute(ctx context.Context, version string) {
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().StringArrayVarP(&input.platforms, "platform", "P", []string{}, "custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)")
rootCmd.Flags().BoolVarP(&input.reuseContainers, "reuse", "r", false, "reuse action containers to maintain state")
+ 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.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow files")
@@ -97,6 +98,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
ForcePull: input.forcePull,
ReuseContainers: input.reuseContainers,
Workdir: input.Workdir(),
+ BindWorkdir: input.bindWorkdir,
LogOutput: !input.noOutput,
Secrets: newSecrets(input.secrets),
Platforms: input.newPlatforms(),