summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorDylan Arbour <dylan.arbour@gmail.com>2020-05-27 05:29:50 +0200
committerDylan Arbour <dylan.arbour@gmail.com>2020-05-27 05:29:50 +0200
commit69b8802ab3aeffa4ac0a8120e30e4f37ab49284f (patch)
tree4327b166c5ddf7edfa484a3b5dfe1035db3097a7 /cmd
parentAdded documentation for module not found issue. (#256) (diff)
downloadforgejo-act-69b8802ab3aeffa4ac0a8120e30e4f37ab49284f.tar.xz
forgejo-act-69b8802ab3aeffa4ac0a8120e30e4f37ab49284f.zip
Change -W command to accept a single file
Currently setting workflows with the -W (--workflows) flag only accepts a folder. It is not possible to run a single workflow.yml file. This commit allows either a single file or a directory to be passed into the workflows flag.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/input.go2
-rw-r--r--cmd/root.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/input.go b/cmd/input.go
index abca42c..f4d3ae8 100644
--- a/cmd/input.go
+++ b/cmd/input.go
@@ -51,7 +51,7 @@ func (i *Input) Workdir() string {
return i.resolve(".")
}
-// WorkflowsPath returns path to workflows
+// WorkflowsPath returns path to workflow file(s)
func (i *Input) WorkflowsPath() string {
return i.resolve(i.workflowsPath)
}
diff --git a/cmd/root.go b/cmd/root.go
index dbac7b1..8b9bfe4 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -42,7 +42,7 @@ func Execute(ctx context.Context, version string) {
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.actor, "actor", "a", "nektos/act", "user that triggered the event")
- rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow files")
+ rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow file(s)")
rootCmd.PersistentFlags().StringVarP(&input.workdir, "directory", "C", ".", "working directory")
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "verbose output")
rootCmd.PersistentFlags().BoolVarP(&input.noOutput, "quiet", "q", false, "disable logging of output from steps")