mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-08-13 22:41:54 +02:00
Once flag polls and completes one job then exits. I use this with Windows Sandbox (and creating users with local brew install on Mac) to create a fresh environment every time. Co-authored-by: Garet Halliday <[email protected]> Co-authored-by: Jason Song <[email protected]> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/598 Reviewed-by: techknowlogick <[email protected]> Reviewed-by: Jason Song <[email protected]> Co-authored-by: garet90 <[email protected]> Co-committed-by: garet90 <[email protected]>
This commit is contained in:
committed by
techknowlogick
co-authored by
Garet Halliday
Jason Song
parent
0348aaac59
commit
8bc0275e74
@@ -42,12 +42,14 @@ func Execute(ctx context.Context) {
|
||||
rootCmd.AddCommand(registerCmd)
|
||||
|
||||
// ./act_runner daemon
|
||||
var daemArgs daemonArgs
|
||||
daemonCmd := &cobra.Command{
|
||||
Use: "daemon",
|
||||
Short: "Run as a runner daemon",
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
RunE: runDaemon(ctx, &configFile),
|
||||
Args: cobra.MaximumNArgs(0),
|
||||
RunE: runDaemon(ctx, &daemArgs, &configFile),
|
||||
}
|
||||
daemonCmd.Flags().BoolVar(&daemArgs.Once, "once", false, "Run one job then exit")
|
||||
rootCmd.AddCommand(daemonCmd)
|
||||
|
||||
// ./act_runner exec
|
||||
|
||||
Reference in New Issue
Block a user