mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-13 01:57:13 +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 <garet@pit.dev> Co-authored-by: Jason Song <wolfogre@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/598 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com> Reviewed-by: Jason Song <wolfogre@noreply.gitea.com> Co-authored-by: garet90 <garet90@noreply.gitea.com> Co-committed-by: garet90 <garet90@noreply.gitea.com>
This commit is contained in:
@ -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