fix: use names

This commit is contained in:
Jason Song 2024-04-02 15:05:21 +08:00
parent 781e011fd8
commit b07c4cf793
No known key found for this signature in database
GPG key ID: 8402EEEE4511A8B5

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