mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-13 18:17:13 +02:00
Add exec
subcommand for runner so that we can run the tasks locally(#39)
Most codes are copied from https://gitea.com/gitea/act/src/branch/main/cmd and do some small changes to make it run again examples: ```SHELL ./act_runner exec -l ./act_runner exec -j lint ./act_runner exec -j lint -n ``` some example result:   Signed-off-by: a1012112796 <1012112796@qq.com> fix #32 Reviewed-on: https://gitea.com/gitea/act_runner/pulls/39 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Jason Song <i@wolfogre.com> Co-authored-by: a1012112796 <1012112796@qq.com> Co-committed-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
@ -54,9 +54,11 @@ func Execute(ctx context.Context) {
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
RunE: runDaemon(ctx, gArgs.EnvFile),
|
||||
}
|
||||
// add all command
|
||||
rootCmd.AddCommand(daemonCmd)
|
||||
|
||||
// ./act_runner exec
|
||||
rootCmd.AddCommand(loadExecCmd(ctx))
|
||||
|
||||
// hide completion command
|
||||
rootCmd.CompletionOptions.HiddenDefaultCmd = true
|
||||
|
||||
|
Reference in New Issue
Block a user