Ensure declare to use new labels #530

Merged
wolfogre merged 3 commits from bugfix/declare into main 2024-04-02 07:39:41 +00:00
Showing only changes of commit b07c4cf793 - Show all commits

View File

@@ -108,7 +108,7 @@ func runDaemon(ctx context.Context, configFile *string) func(cmd *cobra.Command,
runner := run.NewRunner(cfg, reg, cli)
// declare the labels of the runner before fetching tasks
resp, err := runner.Declare(ctx, reg.Labels)
resp, err := runner.Declare(ctx, ls.Names())
if err != nil && connect.CodeOf(err) == connect.CodeUnimplemented {
log.Errorf("Your Gitea version is too old to support runner declare, please upgrade to v1.21 or later")
return err