1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

New "one shot" type of execution by adding a new command called one-job. (#423)

As commented here https://code.forgejo.org/forgejo/runner/issues/422, this PR aims to allow a new type of one shot execution compatible with autoscaling features and other job types.

Co-authored-by: jaime merino <jaime.merino_mora@mail.schwarzª>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/423
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: cobak78 <cobak78@noreply.code.forgejo.org>
Co-committed-by: cobak78 <cobak78@noreply.code.forgejo.org>
This commit is contained in:
cobak78 2025-01-15 12:29:07 +00:00 committed by earl-warren
parent a3cb2b7d6c
commit ba78c11326
5 changed files with 390 additions and 0 deletions

View file

@ -52,6 +52,15 @@ func Execute(ctx context.Context) {
}
rootCmd.AddCommand(daemonCmd)
// ./act_runner job
jobCmd := &cobra.Command{
Use: "one-job",
Short: "Run only one job",
Args: cobra.MaximumNArgs(1),
RunE: runJob(ctx, &configFile),
}
rootCmd.AddCommand(jobCmd)
// ./act_runner exec
rootCmd.AddCommand(loadExecCmd(ctx))